September 2, 2013 at 9:33 am
Hi
Basically, I'm attempting to write a statement based on multiple conditions. So, there will be 2 SELECT statements, IF the results of the first SELECT statement exist in the results of the second SELECT statement, then the script must execute a SP.
Is this possible to do?
September 2, 2013 at 10:01 am
Yes, it is possible. However, for more information on how to do it, we need more information from you.
Check the article linked on my signature to get better help.
September 2, 2013 at 10:36 am
Luis,
Thank you for the reply.
I have though worked it out! I used a JOIN in the IF statement, If the results of the Join were > 0, the script executed the SP
September 2, 2013 at 6:22 pm
wak_no1 (9/2/2013)
Luis,Thank you for the reply.
I have though worked it out! I used a JOIN in the IF statement, If the results of the Join were > 0, the script executed the SP
How are you checking for NULLs?
--Jeff Moden
Change is inevitable... Change for the better is not.
September 3, 2013 at 11:29 am
Just wanted to add, this is a perfect use case for the EXISTS clause with a correlated sub query.
Viewing 5 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