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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-10-29 : 08:31:48
|
| g8054 writes "What I'm trying to do is have update2 happen based soley on the results of update1 Let me sort-of-pseudocode....Update1UPDATE MemberInfoSET intAccountStatus = 0WHERE (DATEDIFF (dd , dtAdded , getDate> 1)Update2UPDATE PropertyListingSET intActive = 0WHERE (fkCompanyID = "Whatever MemberInfo.ID was updated in Update1)This is running as a scheduled update through ColdFusion.So what I'm wondering is if UPDATE returns any sort of report or result set that I could use as the "Whatever MemberInfo.ID was updated in Update 1)~g8054" |
|
|
Seventhnight
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2004-10-29 : 08:43:56
|
why don't you do them in the other order...[code]--Update 1Update PropertyListingSet intActive = 0Where fkCompanyID = (Select id from memberInfo Where datediff(dd,dtAdded,getDate>1))--Update 2Update MemberInfoSet intAccountStatus = 0Where (datediff(dd,dtAdded,getDate>1)Corey |
 |
|
|
|
|
|