jeffmoore64
Programmer
Hi,
I need to use the result from one query to define the name of the field to use in the surrounding query.
The inner select stmt returns the field name (dcEt5)
This just returns:
dcEt5 several thousand times
I need the contents of that field...
TIA
I need to use the result from one query to define the name of the field to use in the surrounding query.
The inner select stmt returns the field name (dcEt5)
Code:
select (select Cost_Field from dbo.Cost_Field_Lookup where MonthNumber = datepart(m,getdate())) from dbo.whm03t
This just returns:
dcEt5 several thousand times
I need the contents of that field...
TIA