Share via

Converting large flat file spreadsheet into Access - need query to populate table

Anonymous
2011-08-03T14:55:38+00:00

I have a large flat file of data (from Excel) that I am trying to convert into Access.  A particular problem I'm having is writing a query that will populate a table that represents a many-to-many relationship.

What I currently have  is:  tblProfitCentresNPS (this is the many to many table that needs to be populated) and the fields within this are Respondent (RespondeeID lookup from tblRespondees), NPSScore (NPSID from tblNPScore), ProfitCentre (ProfitCentreID from tblProfitCentres), Comments

The flat file contains the following data that needs to populate the above tblProfitCentreNPS table

Respondee, Profit Centre, Profit Centre NPS Score, Profit Centre Comments. 

This table contains multiple responses per Respondee but on one line - so the fields are PC1, PC2, PC3 etc for each profit centre, and similarly headed for score per profit centre, and comments per profit centre.

I am trying to work out a query that will pull over the relevant values per respondent and create a record for each profit centre response per respondent.

I am having difficulty with the joins as there as so many tables involved, but I need to convert the original values into look-up values.

Really a bit stuck....

All advice, gratefully received.

Thanks,

Tonia

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2011-08-04T15:37:25+00:00

On my website are several samples of normalizing repeated columns, such as you are describing. 

Document Included

This sample demonstrates how to normalize a simple PC_Inventory table.  Its purpose is to demonstrate the general principles of normalizing denormalized data from a spreadsheet.

Document Included

This sample demonstrates how to normalize a PC_Inventory table that has two sets of repeated columns.  It's purpose is to demonstrate the general principles of normalizing denormalized data from a spreadsheet.

Document Included

This sample demonstrates how to normalize a table that has repeated Yes/N0 columns.  It's purpose is to demonstrate the general principles of normalizing denormalized data from a spreadsheet.

This sample demonstrates how to normalize a table that has repeated columns with VBA.  It's purpose is to demonstrate the general principles of normalizing denormalized data from a spreadsheet with code rather than SQL statements.

Was this answer helpful?

0 comments No comments

10 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-08-04T13:23:32+00:00

    Sorry, unable to post the data - commercially sensitive etc.  I will take a look at Ken's example and come back if I have more questions.

    Thanks

    Tonia

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-08-04T13:22:45+00:00

    I will take a look at this.  Sadly the work firewall won't let me access this site, but I will take a look once I am home.

    Thanks.

    Tonia

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-08-03T17:45:16+00:00

    There is a small file, DecomposerDemo.zip, which illustrates how to decompose a non-normalized table imported from Excel, in my public databases folder at:

    http://cid-44cc60d7fea42912.skydrive.live.com/redir.aspx?resid=44CC60D7FEA42912!169

    It uses a simple structure of contacts who may have one or more employees, and by means of a series of append queries inserts the data into a set of normalized tables.

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2011-08-03T16:18:46+00:00

    Post sample data of the flat file.

    Was this answer helpful?

    0 comments No comments