Can I lable the output column resulting from a SELECT query with a variable from one of the tables which are the source of the data? I know I can hard code the lables in the SELECT statement but since the actual data will not always be “ ½ nuts”, for instance, I want the column to be called whatever is in that field.
I am not sure I have been clear here…hoping so!
In other words, if I have a table containing
Column Name |Data
Data1 |1/2 inch nuts
Data2 |3/8 inch bolts
Stock1 |0.08
Stock2 |0.12
Normal SQL SELECT query result
Data1 |Data2 |Stock1 |Stock2
0.0800 |0.1200 |0.08 |0.12
Desired SQL SELECT query result
1/2 inch nuts |3/8 inch bolts
0.0800 |0.1200
Many Thanks!
CBJ
I am not sure I have been clear here…hoping so!
In other words, if I have a table containing
Column Name |Data
Data1 |1/2 inch nuts
Data2 |3/8 inch bolts
Stock1 |0.08
Stock2 |0.12
Normal SQL SELECT query result
Data1 |Data2 |Stock1 |Stock2
0.0800 |0.1200 |0.08 |0.12
Desired SQL SELECT query result
1/2 inch nuts |3/8 inch bolts
0.0800 |0.1200
Many Thanks!
CBJ
Comment