Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

question on NULL

Status
Not open for further replies.

habesha

Programmer
Oct 30, 2006
68
0
0
US
I have a local variable say @var

I want to select some data from a table XY based on the values of these local variable. The values for the local variable can be NULL or have data

Here is what I want, I want to write a single query to select data from the table only if the variable is not null otherwise I won't select. how calI do that

Thanks
teddy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top