Sabtu, 18 Juni 2016

Re: [MS_AccessPros] DeNormalize Table


Easy to do with a Crosstab query.  Use ProdID as the Row Value, Element as the Column Value, and any aggregate function (Min, Max, First, etc. on the Value as the Value in the Pivot.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)

On Jun 18, 2016, at 8:33 PM, patrinod <> wrote:

Hello Experts.

Win 7, Access 2003

I've been asked to de-normalize a table and desparately need help.

Current structure with data

ID ProdID   Element   Value

1  234             C        0.30

2  234             Mn      1.20

3  234             P         0.30

4  234             S         0.20

5  234             Si        0.35

6  234             Cr        1.40

etc. <- one record for each element and value in each ProdID

I would like to de-normalize the table to

ProdID   C      Mn     P        S     Si     Cr

234      0.30   1.20   0.30  0,20  .035  1.40

one record for each ProdID with the value for each element

Any help would be appreciated. I hope it is explained well enough




Posted by: John Viescas <>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (2)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.



Tidak ada komentar:

Posting Komentar