You folks have been quite helpful, so here is another problem that I am trying to figure out. I am trying to figure out if I can use column data from one table or view to create the column names in another view. For instance, I have vwABC with columns
Now I want to create a view
Except I want the F34_C62 and the F97_C35 to be pulled dynamically from vwABC where the link is on a combination of VName and TName and the value that I want is DName as the column name.
Does that make sense?
wb
Code:
DName VName TName
F34_C62 PPT_F_HX tblPart
F97_C35 PPT_C_HX tblBio
Now I want to create a view
Code:
select tblPart.ppt_f_hx AS F34_C62, tblBio.ppt_c_hx AS F97_C35
from tblPart JOIN tblBio ON tblPart.pptid = tblBio.pptid
Except I want the F34_C62 and the F97_C35 to be pulled dynamically from vwABC where the link is on a combination of VName and TName and the value that I want is DName as the column name.
Does that make sense?
wb