Home Where Clause Case Statement
Reply: 0

Where Clause Case Statement

user5529
1#
user5529 Published in September 19, 2018, 11:28 am

How can I have a where clause be based on a variable:

If I have a variable @PrintNum and it has a number I want a different where clause, but it not it is different. See below: Is this possible?

Where PrintNum = @PrintNum
Else
Where InvNum = @InvNum, 

etc....

share|improve this question
  • It's not very clear what your'e asking. Please edit your question to include sample data as DDL + DML. and desired results. – Zohar Peled Apr 15 at 10:02

1 Answer 1

active oldest votes
up vote 0 down vote
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 7.320183 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO