|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
ASP/SQL Syntax Brain FART!
Hey, could someone remind me how to do this?
I want to select a client from TABLE1 where their sub_id is equal to 'O' or 1? For some reason I forgot how to do this in one statement. Thanks, Andrew J Durstewitz http://www.devbuilder.org |
|
#2
|
||||
|
||||
|
"sub_id" can only be one datatype. So, I'd guess you have it set as either a string, boolean or an int.
SELECT client FROM table1 WHERE sub_id = 0 or sub_id = 1 |
|
#3
|
|||
|
|||
|
Depending on the DB you are using, one of the following should work:
SELECT client FROM table1 WHERE sub_id = 0 or sub_id = 1 or SELECT client FROM table1 WHERE (sub_id = 0 or sub_id = 1) |
![]() |
| Viewing: Dev Articles Community Forums > Programming > ASP Development > ASP/SQL Syntax Brain FART! |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|