Need to select values as aliases?
Posted: Wed Jul 11, 2007 11:36 am
I have this query:
It returns exactly the information I need, but not really how I need it. It returns this:
And I need it to return this:
Any idea how I can do that?
Code: Select all
SELECT
s01_CFM_ProdValues.value,
s01_CFM_ProdFields.code
FROM
s01_CFM_ProdFields,
s01_CFM_ProdValues,
s01_Products
WHERE
s01_CFM_ProdValues.product_id = s01_Products.id
AND
s01_CFM_ProdValues.field_id = s01_CFM_ProdFields.id
AND
s01_Products.code = 'ELL001A'
AND
s01_CFM_ProdFields.code IN ('color','mfcd')Code: Select all
value code (column names)
Blue COLOR
ELL MFCDCode: Select all
COLOR MFCD (column names)
Blue ELL