give table ids based on view name