J
Jesterhoz
Hello All,
I have a union query that queries two tables. These two tables are similar
in a lot of ways, however, some fields in one of the tables have null values
where these same fields in the other table are populated. The following is
my SQL statement:
SELECT InvNo, CustCode, InvDate, InvAmt, Route, FileName FROM Invoices UNION
SELECT InvNo, CustCode, InvDate, InvAmt, NULL as Route, NULL as FileName FROM
SalesAll;
It returns something like the following:
InvNo CustCode InvDate InvAmt Route FileName
12345 56789 2/15/05 $12.34 100 c:\x115.txt
12345 56789 2/15/05 $12.34
This is because this record is in both tables. However, I only want one of
these lines to show on the form, the one with the Route and FileName. Any
ideas?
Any help is much appreciated.
Thanks,
Trevor
I have a union query that queries two tables. These two tables are similar
in a lot of ways, however, some fields in one of the tables have null values
where these same fields in the other table are populated. The following is
my SQL statement:
SELECT InvNo, CustCode, InvDate, InvAmt, Route, FileName FROM Invoices UNION
SELECT InvNo, CustCode, InvDate, InvAmt, NULL as Route, NULL as FileName FROM
SalesAll;
It returns something like the following:
InvNo CustCode InvDate InvAmt Route FileName
12345 56789 2/15/05 $12.34 100 c:\x115.txt
12345 56789 2/15/05 $12.34
This is because this record is in both tables. However, I only want one of
these lines to show on the form, the one with the Route and FileName. Any
ideas?
Any help is much appreciated.
Thanks,
Trevor