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 |
siktui82
Starting Member
8 Posts |
Posted - 2007-06-27 : 21:43:41
|
Hi,How do i update a table from a query search?ExampleTABLE 1INVNO XONOINV00001 XO0002INV00001 XO0003INV00003 XO0005INV00006 XO0007TABLE 2INVNO PAYTYPE CHECKNOINV00001 C NULLINV00001 M DP00001INV00001 H SP00001INV00002 G NETSINV00003 C NULLINV00004 M DP00002INV00004 H SP00002INV00005 V VOU001TABLE 3INVNO RECSEQ XONO PAYTYPE CHECKNOINV00001 01INV00001 02How do i update the table 3 from table 1 n table 2?i tried to do but i got error'Subquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.The statement has been terminated.'Please help |
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-06-27 : 22:06:48
|
for each of those 'INV00001' values you have multiple records in each of the other 2 tables. Do you want to insert multiple records into table3?Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
|
|
siktui82
Starting Member
8 Posts |
Posted - 2007-06-27 : 22:32:37
|
If possible try not to enter multiples entries. But i just seem cant get it right.Thanks |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-06-28 : 09:19:02
|
<<i tried to do but i got error>>Post the query you usedMadhivananFailing to plan is Planning to fail |
|
|
|
|
|