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 |
danielc
Starting Member
49 Posts |
Posted - 2006-08-04 : 14:45:05
|
I must say this is a great forum, quick responses...My question is:I am planning to create a stored procedure to update several tables on DB2 from DB1 that only has one table. DB1 resides on the same server as DB2. As stated earlier DB1 has one table with 46 feilds(columns). The 46 feilds(columns) need to update different tables on DB2. Feild names are different on DB's. DB1StudentIDFirstNameLastNameMiddleNameetc..DB2STU.FNSTU.LNSTU.IDupdate STU set PG = G1FirstName + ' ' + G1LastNamefrom db1.dbo.StudentEnrollmentwhere STU.ID = StudentEnrollment.StudentIDWould I have to write 46 update statements in the sproc?Thanks all,Daniel |
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-08-04 : 14:54:43
|
What do u mean by "Data elements" ? Post some sample data & expected results.Srinika |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-08-08 : 12:56:28
|
You can use seperate update statements or use While LoopBut you need to give more informationsMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|