Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lane0618
Posting Yak Master
134 Posts |
Posted - 2002-06-21 : 15:07:30
|
| Is it possible to get this to work? I tried to do it with CSV but the list is too big for varchar(8000). I get this error:Server: Msg 1032, Level 15, State 1, Line 7Cannot use the column prefix '#temp'. This must match the object in the UPDATE clause 'dbo.Features_bu'.select skuinto #tempfrom dbo.dataUPDATE dbo.Features_buSET #temp.sku = 0WHERE (dev IS NULL)drop table #tempThanks!Lane |
|
|
jrlrwilson
Starting Member
3 Posts |
Posted - 2002-06-21 : 15:11:04
|
| you may need to create the #table prior to inserting into it.jeremy wilson |
 |
|
|
setbasedisthetruepath
Used SQL Salesman
992 Posts |
Posted - 2002-06-21 : 15:12:16
|
quote: Is it possible to get this to work? I tried to do it with CSV but the list is too big for varchar(8000). I get this error:Server: Msg 1032, Level 15, State 1, Line 7Cannot use the column prefix '#temp'. This must match the object in the UPDATE clause 'dbo.Features_bu'.select skuinto #tempfrom dbo.dataUPDATE dbo.Features_buSET #temp.sku = 0WHERE (dev IS NULL)drop table #tempThanks!Lane
I'm inferring from your SQL that your intent is to set the SKU in dbo.data to zero where a corresponding row in dbo.features_bu has a NULL dev column. You will need a join in your update to do this. What is the foreign key relationship between dbo.data and dbo.features_bu?Jonathan Boott, MCDBA |
 |
|
|
lane0618
Posting Yak Master
134 Posts |
Posted - 2002-06-21 : 16:31:52
|
| The records that #temp.sku returns are column names. I don't know if I made that clear. So how do I pass the values in #temp.sku to my update statement? Thanks,LAne |
 |
|
|
|
|
|