
Kurse
New User
Jan 21, 2009, 10:19 AM
Post #1 of 1
(183 views)
|
|
Using LIKE and binding wildcard variables
|
Can't Post
|
|
Hi - I'm trying to bind variables to an SQL statement. The statement must either return all records for one given number, or many records for many numbers using a wildcard such as '%'. If a number is provided then the statement works with '... organization_code = ? ...' If no number is provided then the statement needs to pass only the '%' wildcard - this is where I'm stuck. I have tried ' ... organization_code like ? ... and passed '%' with no luck. I am however able to pass '352%' and it binds correctly. I have also tried not binding anything if a number is not provided but it doesn't seem to like that because the bind is already set up to happen sometimes. Any help is appreciated. I'm new as well! Hello!
|