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 |
Mondeo
Constraint Violating Yak Guru
287 Posts |
Posted - 2010-09-15 : 12:23:40
|
Hi,I have thisUPDATE Main ASET A.Source = (SELECT DISTINCT B.Source FROM Figures BWHERE (A.VehicleRef = B.VehicleRef) AND (B.Source = 'SPC')) I get Incorrect syntax near 'A'. Can anyone help?Thanks |
|
X002548
Not Just a Number
15586 Posts |
|
russell
Pyro-ma-ni-yak
5072 Posts |
|
Mondeo
Constraint Violating Yak Guru
287 Posts |
Posted - 2010-09-15 : 12:37:34
|
Hi,Main------vehicleref source1 NULL2 NULL3 NULLFigures-------vehicleref source1 AAA1 BBB1 AAA2 AAA2 BBB2 SPC3 SPC3 SPC3 SPCI want to set main.source to 'SPC' if 1 or more figures rows have 'SPC' as the sourceIn this case 2 and 3 should be set to 'SPC'Thanks |
 |
|
|
|
|