March 18th, 2013, 07:49 AM
I have a table of trips in a schedule, The trip will consist of an outward and a return.
both records will look like this
I would like to be able to select schedule items where EITHER The PuAddress OR DoAddress matches my search
The only way i can think to do it is by using a union to to grab both side of the trip
SELECT * FROM trips where PUaddress = "address"
SELECT * FROM trips where DOaddress = "address"
My gut feeling is there has to be an easier way??
March 18th, 2013, 08:11 AM
You should use single quotes for strings in SQL.
where 'address' in (PuAddress,DoAddress)