Union , 2 fields from one table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

What I have is a route query. I have pick up and drop off locations. What I
would like to do is to prin a report that combine pick up and drop off in the
first address field, and just the drop off in the second address feild. If it
shows that there is a drop off in the first address field, then the second
one should show blank.
 
Perhaps something like this:

SELECT [PickUp] AS Address,
[DropOff] AS Target,
"pick up" AS EntryType
FROM Table1
UNION ALL
SELECT [DropOff] AS Address,
Null AS Target,
"drop off" AS EntryType
FROM Table1;
 
Back
Top