Automate assigning the values from one tableâs tex
I have a table called Codes where one field contains codes and the second field contains the code descriptions:
Table Name: tblCodes
Fields:
CODE: string aka char aka text
CODE_DESCRIPTION: string aka char aka text
I need to design a query that takes each field CODE and makes it a Column Heading and then drops the corresponding CODE_DESCRIPTION underneath that Column Heading as a single row entry. For example, if the table tblCODE looks this way:
CODE CODE_DESCRIPTION
E1 Regular Hours
E2 Overtime Hours
E3 Sick Hours
Then, I would need the query to make the following output:
Regular Hours Overtime Hours Sick Hours
E1 E2 E3
Can I do this using a crosstab query? If so, how? If not, is there another way to automate this with a query?
Thanks!
|