0

SQL creating task dependents

I am trying to have my query change a task to ready when the determined task is closed. All tasks have a task ID that is specific and specific to the job. Thei are 10 jobs with thei own ID and 100 tasks split across the 10. Select Case When sa.requestid = 123 and sa.status <> 3 Does not exists (select 1 from serviceask sa where sa.requestid = 321 and sa.status in (1,3)) then ‘ready’ From tasks sa Than repeat for ever task (sa.requestid ) for every job than else and end. Currentky when one when is try all subsequent tasks turn ready which is bad, This does not fail but is flawed on my query i have ten of those statements built each one has different task ids. So the task that should show ready does but all tasks afterwards do as well. It’s like when a true occurs it trues all the others and jumps to the end

3rd Aug 2019, 5:46 AM
Mike Kinnan
Mike Kinnan - avatar
2 Respuestas
+ 2
Hello Mike Kinnan, First I apologize because I didn't come here with a solution, rather I came to inform that there might be a need for you to edit the Description, I was having difficulty trying to understand what you want to do, what that SQL command was supposed to do, whether it works, and/or where/how it failed to meet the needs. I guess you can improve the question if you just include table structure, and table relationship information, that way hopefully, others who reads/follows this thread will have more information to understand your situation, and can come up with a good, to the point solution, or a recommendation/suggestion. Good luck! 👍
3rd Aug 2019, 6:18 AM
Ipang
+ 1
hey i added some extra details only been using sql for like 2 months and self lesrning lol
3rd Aug 2019, 6:29 AM
Mike Kinnan
Mike Kinnan - avatar