Import and convert a pivot table? (1 Viewer)

ttomw

Registered User.
Local time
Yesterday, 22:12
Joined
Apr 13, 2012
Messages
26
I need to import data in this format:


The top row of numbers are AttributeIds

In order to import it into my DB I need to convert it into the following fields and records:


etc.

Any fields that are null should not get a record in the conversion.

Any ideas?
Thanks Much!
Tom
 

Attachments

  • Antipivot.JPG
    Antipivot.JPG
    30.7 KB · Views: 155
  • Pivotsample.JPG
    Pivotsample.JPG
    14.6 KB · Views: 238

namliam

The Mailman - AWF VIP
Local time
Today, 07:12
Joined
Aug 11, 2003
Messages
11,695
There are 2 ways to do this:
1)
Import your table into a temp table
Run append queries per column to get the imported table into the desired normalized format

2)
Write VBA to import the table directly, a little more complex though likely cleaner and no risk of bloating.
 

ttomw

Registered User.
Local time
Yesterday, 22:12
Joined
Apr 13, 2012
Messages
26
There are 2 ways to do this:
1)
Import your table into a temp table
Run append queries per column to get the imported table into the desired normalized format

2)
Write VBA to import the table directly, a little more complex though likely cleaner and no risk of bloating.

Thanks for the suggestions.

The images I posted are just small subsets. The actual dataset has 26 attributes and ~27000 records. So while option 1 is doable, it wouldn't be very fun, especially if I have to reimport or maintain the data on regular basis.

I am hoping to find a tool or module or vba code that can handle this operation. I am a newbie to scripting...
 

namliam

The Mailman - AWF VIP
Local time
Today, 07:12
Joined
Aug 11, 2003
Messages
11,695
There wont be any vba available to will cover your problem specificaly.

Both versions though will have issues with re-processing the same data (again).

The queries can be run automated as well either thru VBA or Macro
 

kiwipeet

Programmer wannabe
Local time
Today, 15:12
Joined
May 13, 2008
Messages
25
Into a table and create a view which does the conversion on the fly?
 

Users who are viewing this thread

Top Bottom