Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Re-create the table, but preserve the data
Message
 
 
To
03/06/2008 13:55:38
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01321355
Message ID:
01321376
Views:
15
Unfortunately, this is not that simple.

I tried

IF object_id('tempdb..#temp_Registration') is not null
insert into Registration select * from #Temp_Registration

But I'm getting an error Msg 213, Level 16, State 1, Line 10
Insert Error: Column name or number of supplied values does not match table definition.

I guess I need to research this problem in more details ...

>>Hi everybody,
>>
>>I want to have a create table script which I can execute multiple times (so I would need to have drop statements first).
>>
>>I also would like to be able to preserve existing data.
>>
>>Is there a way to write such a script?
>>
>>Thanks a lot in advance.
>
>Isn't there something like a temp table in sqlserver ?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform