Working with Normalized Table 
Author Message
 Working with Normalized Table

I have a table set up as follows

ID    Event     Date
1        20        5/01
1        21        5/12
1        30        7/11
2        99        2/6
3        99        3/4
3        20        4/18
4        21        6/21
4        20        7/1
4        30        7/30

The events represent admission (99), hospitalization (20), return from the
hospital (21) and discharge (30).  What I need to do is to calculate the
interval between hospitalization and return from the hospital.  In all
instances a return date is later than the hospitalization date but some
clients who are hospitalized are discharged prior to returning (handling
this exception is not a problem for me).

One way to do this is to un-normalize the data such that events are arrayed
across columns of the same record but I have to believe there is a more
elegant solution.  I can probably handle the coding once I figure out how to
make row to row comparisons.  It seems to me that multiple rows of data for
each client ID have to somehow get read into an array but I don't know how
to do this.  Can anyone help?

Eric Graig



Mon, 08 Apr 2002 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. Working wit Normalized Table

2. Normalizing a flat table w/VBA

3. Normalizing a table with VBA

4. Normalizing non-normal tables already containing data;OR changing columns into rows

5. Code to normalize a database

6. normalizing

7. Normalize String Spacing

8. Are there performance gains from normalizing data?

9. Normalized Data

10. Normalized Random Number Generator

11. Normalize string spacing

12. Exporting Normalized Data

 

 
Powered by phpBB® Forum Software