Query Results as Table Headers

misternumbertwo

Registered User.
Local time
, 07:47
Joined
Dec 29, 2008
Messages
11
Guys,

I need to find a way to convert results of a single column query to headers of a table. Here's a gist of the situation:

I am doing a database for Freight Rates but the fields and number of fields vary upon each lane. Now I need to find a way to pull information out of different tables; tbl_OriginCharges, tbl_DestinationCharges and tbl_FreightCharges, all 3 have 50 fields on it with Field names (F1...F50). I also have a separate table for the headers which i want to pull the table headers from.

So, is there a way to join all these four tables and pull it as such that F#'s will be replaced by the header names in the header table?

Any suggestion will be highly appreciated.
 
Not via a single query.

If the field names are permanent, simply create the desired table as any other table.

You can create a table programmatically on the fly, with whichever field names you want. Look up TableDefs in the documentation.

Use Append and Update queries, to insert data from your 3 data tables to the new one.
 
And BTW, what do the field names signify? I have a suspicion that you are working on some carry-overs from Excel, whereas instead of a separate column, the data should probably all wind up in the same column with some appropriate tag as an extra column.
 
Your table structure is denormalized. You need to completely restructure it before doing anything else.

What defines the differences between the data held in the 50 fields.
 

Users who are viewing this thread

Back
Top Bottom