Please go thourgh Attached Image where i descirbed my scenario:
I want SQL Join query.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Have a look at something like
The query will return all orders based on the given criteria.
So, what it does is, when
@IsBook = 1it will return all Orders where there exists 1 or more entries linked to this order that are Books. And if@IsBook = 0it will return all Orders where there exists 1 or more entries linked to this order that are not Books.