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 |
|
a.ashabi
Posting Yak Master
117 Posts |
Posted - 2008-09-18 : 14:30:01
|
| but now I have another problem!when I want to update the table:UPDATE name$SET product_id =(SELECT dbo.tbl_product_vendor.product_id AS PID FROM dbo.tbl_product_vendor CROSS JOINdbo.name$WHERE (dbo.tbl_product_vendor.vendor_code LIKE '%' + dbo.name$.product_vendor_code + '%'))the error is subquery returned more than one value.what should I do to update all the fields on name$ table?thanks |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-18 : 14:33:54
|
| [code]UPDATE name$SET product_id =dbo.tbl_product_vendor.product_idFROM name$INNER JOIN dbo.tbl_product_vendorON dbo.tbl_product_vendor.vendor_code LIKE '%' + dbo.name$.product_vendor_code + '%'[/code] |
 |
|
|
a.ashabi
Posting Yak Master
117 Posts |
Posted - 2008-09-18 : 14:40:45
|
| thanks.It worked :) |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2008-09-18 : 14:41:24
|
quote: Originally posted by a.ashabi thanks.It worked :)
welcome |
 |
|
|
|
|
|