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 |
dwi555
Starting Member
9 Posts |
Posted - 2013-06-12 : 23:18:41
|
hello, can anyone help me. i have this codeselect a.unitkey, a.nospp, b.nobpk, c.nospj from (table1 a inner join table2 b on a.unitkey=b.unitkey) inner join table3 c on b.unitkey=c.unitkeywhere a.unitkey='42_' and a.nospp='900/13/2013' and b.nobpk like '%001/feb%' and c.nospj like '%jan%'and this is the results-----------------------------------------------------unitkey | nospp | nobpk | nospj | -----------------------------------------------------42_ | 900/13/2013 | 00001/feb | 0001/jan |-----------------------------------------------------i want to update nospj. anyone can help me what is the code to update that. thanks.. (sorry for bad english) |
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-06-13 : 00:04:46
|
UPDATE cSET c.nospj = YourValue/column/expressionfrom (table1 a inner join table2 b on a.unitkey=b.unitkey) inner join table3 c on b.unitkey=c.unitkeywhere a.unitkey='42_' and a.nospp='900/13/2013' and b.nobpk like '%001/feb%' and c.nospj like '%jan%'--Chandu |
|
|
dwi555
Starting Member
9 Posts |
Posted - 2013-06-13 : 00:24:09
|
quote: Originally posted by bandi UPDATE cSET c.nospj = YourValue/column/expressionfrom (table1 a inner join table2 b on a.unitkey=b.unitkey) inner join table3 c on b.unitkey=c.unitkeywhere a.unitkey='42_' and a.nospp='900/13/2013' and b.nobpk like '%001/feb%' and c.nospj like '%jan%'--Chandu
great,., thanks chandu |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-06-13 : 00:28:41
|
quote: Originally posted by dwi555
quote: Originally posted by bandi UPDATE cSET c.nospj = YourValue/column/expressionfrom (table1 a inner join table2 b on a.unitkey=b.unitkey) inner join table3 c on b.unitkey=c.unitkeywhere a.unitkey='42_' and a.nospp='900/13/2013' and b.nobpk like '%001/feb%' and c.nospj like '%jan%'--Chandu
great,., thanks chandu
Welcome--Chandu |
|
|
|
|
|