I'm tryin to create a form that allows null or *
i have three instances
dbname
cust
rel
if all are * then list all, if dbname is star and others and values miss out dbname.. etc
is there a clever way to build up the sql query instead of lots of iffs
Printable View
I'm tryin to create a form that allows null or *
i have three instances
dbname
cust
rel
if all are * then list all, if dbname is star and others and values miss out dbname.. etc
is there a clever way to build up the sql query instead of lots of iffs
Yes. I think. I'm not entirely sure exactly what you're asking but it sounds like you want to build a dynamic string to query the database based on some user input that is then submitted to the page (either by itself or another page). To that the answer is Yes. And you already guessed the method- Conditional structures like If..Then or Select..Case. You just have to decide what combinations generate what SQL code. Make sure you handle all possible combinations (or create a default scenario that executes if no other fits the bill)