By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,359 Members | 1,481 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,359 IT Pros & Developers. It's quick & easy.

Union blank records

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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

P: n/a

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.