pauldonson
asked on
Using an OR operator in a SQL statement
Bit of a mental block on this!!
I have a function with a select statement in it. One of the tables has two fields in in "Transport_driven_by" CHAR(3) and "Transport_Driver" BIT.
I want to return a 1 in my select statement if EITHER Transport is not null OR Transport_driver = 1 - Otherwise return a Zero.
Thus
Select placement_ID, Booking_ID (ETC), [statement re above] as Transport, Person_ID (ETC) from tbl_placements
Can anyone help please?
I have a function with a select statement in it. One of the tables has two fields in in "Transport_driven_by" CHAR(3) and "Transport_Driver" BIT.
I want to return a 1 in my select statement if EITHER Transport is not null OR Transport_driver = 1 - Otherwise return a Zero.
Thus
Select placement_ID, Booking_ID (ETC), [statement re above] as Transport, Person_ID (ETC) from tbl_placements
Can anyone help please?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER