Hi Guys,
I'm pretty new when it comes to SQL and only know the basics.
I want a query that does the following.
I've got a page with four drop down boxes containing various variables. The default entry in the job down box is blank.
The user should be able to select one of the boxes, or more if they wish ... press the button which executes the SQL and returns the result.
Say I did an SQL query that;
select * from x where (var1 = @var1) AND (var2 = @var2) up to var 4
Can I pass a wildcard(?) in the =@ variable that I pass to the query if the user does not select anything in one of the boxes?
e.g...
select * from x where (var1 = *)
Hope i'm being clear :-S
Thanks
Steve
I'm pretty new when it comes to SQL and only know the basics.
I want a query that does the following.
I've got a page with four drop down boxes containing various variables. The default entry in the job down box is blank.
The user should be able to select one of the boxes, or more if they wish ... press the button which executes the SQL and returns the result.
Say I did an SQL query that;
select * from x where (var1 = @var1) AND (var2 = @var2) up to var 4
Can I pass a wildcard(?) in the =@ variable that I pass to the query if the user does not select anything in one of the boxes?
e.g...
select * from x where (var1 = *)
Hope i'm being clear :-S
Thanks
Steve