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 |
|
sahu74
Posting Yak Master
100 Posts |
Posted - 2002-10-19 : 13:19:59
|
| I have a table(XYZ) with a composite primary key (say PK1 and PK2). I need to update table (ABC) (whose composite primary keys are PK1, PK2 and yearNo) in the following manner.update ABCset NumStudent = var1where yearNo = var2and PK1 = var3and PK2 = var4I want to update table ABC in the form of a loop for every combination of yearNo, var3, var4.Also the value of var1 is the result of a query that changes with the value of var3 and var4 (i.e the value of PK1 and PK2).Any help will be greatly appreciated.pks. |
|
|
|
|
|