query that displays columns as rows

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello:

I have a table with the following fields:
field_name1
field_name2
field_name3

I want to populate a combo box with the values in those fields - thus output
the values as rows rather than columns. Is there any way to write a query (or
do the job!) that would allow such a thing?

Thanks for any help.
 
Darren said:
Hello:

I have a table with the following fields:
field_name1
field_name2
field_name3

I want to populate a combo box with the values in those fields - thus output
the values as rows rather than columns. Is there any way to write a query (or
do the job!) that would allow such a thing?

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Not sure what you want, but, if the column data types are the same you
could, perhaps, use a UNION query:

SELECT field_name1 As CombinedColumn FROM table_name
UNION
SELECT field_name2 FROM table_name
UNION
SELECT field_name3 FROM table_name

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQiaTzoechKqOuFEgEQIrPACfRLHq7oFzpq2BnkHMeecqdN5NIXUAn1+R
zN3jbzW+iYgi4bw7O/xJvw7C
=Zxg9
-----END PGP SIGNATURE-----
 
Back
Top