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

Show some fields below one another in query, from same table.

P: n/a
This is kind of convaluted, but basically I have a massive source table
with:
Fname1, Lname1, Fname2, Lname2, Address, City, ST, Zip

and I want the query to output

Fname1a, Lname1a, Address, City, ST, Zip
Fname2a, Lname2a, Address, City, ST, Zip
Fname1b, Lname1b, Address, City, ST, Zip
Fname2b, Lname2b, Address, City, ST, Zip
Fname1c, Lname1c, Address, City, ST, Zip
Fname2c, Lname2c, Address, City, ST, Zip
etc.

Can this be done, and how?

Thanks.

Dec 22 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
You want a union query.

Try
Select Frame1, Address, City, ST, Zip, 1 as DisplayOrder
Union
Select Frame2, Address, City, ST, Zip, 2 as DisplayOrder
Order by DisplayOrder

Hope this helps.

<Je***********@gmail.comwrote in message
news:11*********************@73g2000cwn.googlegrou ps.com...
This is kind of convaluted, but basically I have a massive source table
with:
Fname1, Lname1, Fname2, Lname2, Address, City, ST, Zip

and I want the query to output

Fname1a, Lname1a, Address, City, ST, Zip
Fname2a, Lname2a, Address, City, ST, Zip
Fname1b, Lname1b, Address, City, ST, Zip
Fname2b, Lname2b, Address, City, ST, Zip
Fname1c, Lname1c, Address, City, ST, Zip
Fname2c, Lname2c, Address, City, ST, Zip
etc.

Can this be done, and how?

Thanks.

Dec 22 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.