help with query

scorpio_x73

Registered User.
Local time
Today, 19:00
Joined
Jul 10, 2003
Messages
12
a have a table with 10 fields (col1,col2,col3...col10) i want to make a query that will show in a custom field all the data from that fields example


col1=red
col2-green
col3=blue

in my query i have one custom field with name COLOR when i run the query i want the field color to show all the colors like

color
red
green
blue

i tried something like this but is not working

color:[col1] or [col2]

it returns a value -1

if anyone can help please
 
Try a UNION query

SELECT Col1
FROM Colour Table

UNION

SELECT Col2
FROM Colour Table

UNION

SELECT Col3
FROM Colour Table

etc and do not forget to end with ;


Len B
 
Or, if you can, consider redesiging that table to bring it inline with database normalisation guidelines - especually First Normal Form (1NF).
 

Users who are viewing this thread

Back
Top Bottom