|
-
Aug 8th, 2002, 10:47 AM
#1
Thread Starter
Lively Member
sql and wildcards
I want to build a sql string from a form. I have four dropdown boxes, if there is a selection in a box it gets put in the sql string.
Problem is if there is no selection then my string doesn't work.
to keep it simple lets stick to two pulldowns
Ex.
sql="select * from product where Foundby =" & PullDown1 & Product=" & PullDown2
If PullDown2 has no selection it should be a wildcard but the * doesn't seem to work.
Without building a bunch of if statements with different sql strings is there an approach I can take to still retrieve all data regardless of whether PullDown1 or PullDown2 has a entry.
-
Aug 8th, 2002, 10:51 AM
#2
sql uses % isntead of *
and _ isntead of ?
-
Aug 8th, 2002, 10:51 AM
#3
you also have to use like
Where field like '%ello'
-
Aug 8th, 2002, 10:56 AM
#4
Addicted Member
What Cander said!!!!
sql uses % isntead of *
and _ isntead of ?
you also have to use like
Where field like '%ello'
Cander Beat Me to it!!!
There's only Three kinds of people in this world.....
Those that know how to count, and those that do not......
 ]
-
Aug 8th, 2002, 11:53 AM
#5
Thread Starter
Lively Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|