you should have stated specifically what the "some difficulty" is. But syntactically youo are missing a final table alias.INSERT INTO dbo.Members SELECT * FROM ( SELECT DISTINCT C.[MBR_ID], USER_FULL_NM FROM ( SELECT DISTINCT [MBR_ID] FROM dbo.MEM_TABLE ) C LEFT OUTER JOIN [MDR].[dbo].[CUST_TABLE] E ON C.[MBR_ID] = E.[MBR_ID] ) d
YOu have a lot of nested derived tables and DISTINCT key words there - wouldn't this work?insert dbo.membersselect C.[MBR_ID] ,USER_FULL_NMfrom dbo.mem_table cleft outer join [MDR].[dbo].[CUST_TABLE] E ON e.[MBR_ID] = c.[MBR_ID]group by C.[MBR_ID] ,USER_FULL_NM
Be One with the OptimizerTG