Nigel Rutter (10/4/2007)
Doesn't need to use a cursor, it can be replaced by:SELECT @InsertQuery = @InsertQuery + column_name + ',' from ##Temp_Generate
Hope Jeff M doesn't see this 😉
Heh... I got'cha covered, Nigel. 😀 And almost perfect... my only question would be, what are you going to do with the trailing comma 😉
--Jeff Moden
Change is inevitable... Change for the better is not.