Print Page | Close Window

Denormalize.mdb (intermediate)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=354
Printed Date: 28 Mar 2024 at 4:25am
Software Version: Web Wiz Forums 12.03 - http://www.webwizforums.com


Topic: Denormalize.mdb (intermediate)
Posted By: Roger Carlson
Subject: Denormalize.mdb (intermediate)
Date Posted: 01 Aug 2008 at 5:19am

Please consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm - find out why here .
 

Denormalize.mdb

Assume the tables below:

Denormalize takes the data in table1 and creates table2. Thus it denormalizes a normalized table. This has 4 subs/functions. "DenormalizeTable" is the main sub which calls the others. "CreateDenormalizedTable" deletes and re-creates table2. It calls "MaxNumberOfFields" to decide how many fields to create. Lastly, "DenormalizeIt" does the denormalization.

To execute it, go the module, put your cursor in the first sub, and push the execute button.

TABLE1
ID   Value
1    10
1    20
2    30
2    40
2    50
2    60
2    70
3    80
3    90
4    100

TABLE2
ID  Value1  Value2  Value3  Value4  Value5
1   10
2   30      40      50      60      70
3   80      90
4   100
 
Download
Access 97 (32 KB):
http://www.rogersaccesslibrary.com/forum/uploads/5/Denormalize97.zip - Denormalize97.zip
Access 2000 DAO (48 KB): http://www.rogersaccesslibrary.com/forum/uploads/5/Denormalize2k.zip - Denormalize2k.zip



-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.03 - http://www.webwizforums.com
Copyright ©2001-2019 Web Wiz Ltd. - https://www.webwiz.net