473,396 Members | 2,158 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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
2 3535
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: KENNY L. CHEN | last post by:
Dear experts, I have two tables in my Oracle 8i database: TEST (COL1,COl2,REC_NO) and TEST1 (COL1,COL2,REC_NO). Both tables are unique-indexed on (COL1,COL2,REC_NO). I think the following...
14
by: Salad | last post by:
A97. Situation: I have 3 tables with a text field in each and a date field in the first 2 tables: Table1 Text1, Date1 Table2 Text2, Date2 Table3 Text3 (no date field) The following...
2
by: M Stery | last post by:
Have two base queries used for mailing labels with id,name,address,city,state,zip that are combined via a union query. One base query uses home address; the other base query uses biz address. I...
5
by: Alicia | last post by:
Hello everyone based on the data, I created a union query which produces this. SELECT ,,, 0 As ClosedCount FROM UNION SELECT ,, 0 AS OpenedCount, FROM ORDER BY , ;
5
by: Lyn | last post by:
This one is difficult to explain, so I will cut it down to the basics. I have a major table 'tblA' which has an autonum field 'ID-A' as primary key (of no significance to users). 'tblA' contains...
2
by: mattytee123 | last post by:
I have about 20 tables, of which I would like to do a union query and count of how many of each different code there is? The simplified verson of the table is structured like this. Code ...
0
by: alienstudios | last post by:
We have a table that has a multi-line per person record Here are the fields ID Gene1 Gene2 Gene3 Each person usually has two records (IE two Rows have ID 1) However in one row Gene 1 is...
3
by: Winglet | last post by:
Hi, I have 2 tables in Access that I would like to join. They both have a Item No Field and a Description Field. However, Table A has a blank descrption field for some item #'s and these descriptions...
6
by: jmarcrum | last post by:
Hi! I have created a Union Query in ACCESS 2003, that combines 130 records from one query (Extra Foreman Radios) and 250 records from another query (Forman Main Radios). I have created a...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.