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 |
MikeB
Constraint Violating Yak Guru
387 Posts |
Posted - 2003-10-22 : 08:07:46
|
I can have several records with different barcodes as primary keys. I want to update only a few of them and set a field vlue. Can this be done using nesting?UPDATE tblStructuralSchedule SET PourNumber = 2 SELECT TOP 2 (*) FROM tblStructuralSchedule ORDER BY Barcode DESCAny Ideas?Mike B |
|
MikeB
Constraint Violating Yak Guru
387 Posts |
Posted - 2003-10-22 : 08:20:27
|
I think I got it!UPDATE tblStructuralScheduleSET PourNumber = 2WHERE (Barcode IN(SELECT TOP 2 BarcodeFROM tblStructuralScheduleORDER BY Barcode DESC)) |
 |
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
|
|
|
|