467,887 Members | 1,568 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,887 developers. It's quick & easy.

Union blank records

When I do the following union query - it works but it gives me blank
records then my list

SELECT [LastFirst], [Buyer_ID]
FROM BuyerListName
UNION SELECT [Farm], [Buyer_ID]
FROM Buyers
ORDER BY [LastFirst];
It gives me the union but it gives me a blank line for each record and
then starts my list.

Sep 27 '06 #1
  • viewed: 3145
Share:
2 Replies
First make sure that each query runs/returns rows individually. Make a
new query from the first query in the union and see what it returns.
Then create another query from the 2nd query and see what it returns.
If they both return data - then the union query should show that data
combined. IF each individaul query does not return any data, then that
is your problem - no data returned.

Rich

*** Sent via Developersdex http://www.developersdex.com ***
Sep 27 '06 #2

pr********@bellsouth.net wrote:
When I do the following union query - it works but it gives me blank
records then my list

SELECT [LastFirst], [Buyer_ID]
FROM BuyerListName
UNION SELECT [Farm], [Buyer_ID]
FROM Buyers
ORDER BY [LastFirst];
It gives me the union but it gives me a blank line for each record and
then starts my list.
I assume that by 'it gives me a blank line for each record and then
starts my list' you mean that you get a group of blank records followed
by a group of non-blank records. You probably have records in one (or
both) tables where LastFirst and Buyer_ID are null or empty. Your
'order by' clause will place such records at the top of your result
set.

Bruce

Sep 28 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by M Stery | last post: by
2 posts views Thread by mattytee123 | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.