January 29, 2020 at 7:12 pm
Hi
I am having situation where I would like to update the existing data before inserting any new record. It records are two in row, update both but if they are not , then I don't need to update again.
In below example, I am inserting data for process ID 3 with process status 2.. But Since FailedNumber is already exist in ProcessTable & His status was 1 and I would like to update his status to 2 for processID 1 & 2 . Once the data updated and inserted,, there is another process that will change status to 1(after another process run).
There is another situation where I am inserting data for peocessID 3.. While inserting the data for process ID 3.. I am looking for Previous Process ID with failedNumber.. Since ProcessID 2 is not exist, I don't want to update process status to 2 for ProcessID = 1
Let me know if you need more explanation.
Thanks
Bhavesh
January 30, 2020 at 8:10 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
January 30, 2020 at 9:36 pm
Didn't you get some answers, and more questions, in this thread?
https://www.sqlservercentral.com/forums/topic/looking-for-sql-code
Michael L John
If you assassinate a DBA, would you pull a trigger?
To properly post on a forum:
http://www.sqlservercentral.com/articles/61537/
January 31, 2020 at 1:46 pm
Thanks. It was duplicate due to internet issue.
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy