Morphing data from one db (horizontal one simple key) to vertical (combined key)

J

JR

I have to work with two data bases both of which have are
inherited and can not be changed because they both feed
different models.

Database one is arranged horizontally:

(key)
Customer ID | Location | Item 1 QTY | Item 2 QTY | Item 3
QTY

Database is arranged Vertically:

(key) (key) (key)
Customer ID | Location | Item | QTY

I must take database one and morph it into data base two.

I haven't the foggiest idea how to do so - can anyone lend
a hand?

Thanks!
 
P

PC Datasheet

In table 2 I assume Item is 1, 2 or 3.

Create a query based on table 1. Include the fields:
CustomerID
Location
Item 1 QTY

Enter this expression in the fourth field:
Item:1

Change the query to an append query and append to table 2.

Change the query:
Item 1 QTY to Item 2 QTY
Item:1 to Item:2

Run the query again.

Repeat for item 3
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top