Link to home
Start Free TrialLog in
Avatar of pauldonson
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?
ASKER CERTIFIED SOLUTION
Avatar of adathelad
adathelad
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of pauldonson
pauldonson

ASKER

Perfect, thanks for the quick response.