View Single Post
  #2 (permalink)  
Old 07-04-09, 04:18
dportas dportas is offline
Registered User
 
Join Date: Dec 2007
Location: London, UK
Posts: 732
There's nowhere in your proc that you actually create that table. Did you intend to do this:

SELECT COLUMN_NAME, COLUMN_DEFAULT AS column_def
INTO dbo.[____TEMP____TABLE___]
FROM INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME ='TMovie' ;

Never use the prefix "sp_" for user stored procedures. sp_ is reserved for system procedures only and will adversely affect the behaviour of your code.
Reply With Quote