Can query pick from four diffrent field and past it only in one filed

M

Mike Saifie

Can I build a query where it can pick from four diffrent field and place it
on one single field.
Mike

filed1 field 2 field 3

resust is like this

field1
field2
field3
 
G

Guest

Yes, you can use a "union" query to do this. The SQL for that query would
look something like this:

SELECT field1 AS theField FROM theTable

UNION ALL SELECT field2 AS theField FROM theTable
UNION ALL SELECT field3 AS theField FROM theTable

This result from this query will be a list of records with the first batch
of records containing field1 and the next batch of records containing field2
and so on. The UNION query is a good way to deal with un-normalized tables
that have several fields containing the same type of data.

Lee Robinson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top