Re: Revisting part of a recent post



Jean,
I did that and it works. It is just very slow when going through thousands
of records having to do thousands of queries.
Craig

"Jean Friedberg" <jfriedberg@xxxxxxxxxxxxx> wrote in message
news:45e3072d$1@xxxxxxxxxxxxxxxxxxxxxxxxxxx
Craig,

Give your answer table a name like "temp1". Query temp1 for the specific
medical record number you want records for.

Jean

"Craig" <craig.futterman@xxxxxxxxxxxxxxxxxx> wrote in message
news:45e30596$1@xxxxxxxxxxxxxxxxxxxxxxxxxxx
I am having trouble implementing some advice given me last week.
First the setup:
A normalized database where patients are admitted to the PICU.
Each admission has a set of unique identifiers for THAT admission and
those
are used as the key fields (3 of them)
Each patient has a medical record number which I don't use as a key field
(too unreliable on admission).
The "Bioinfo" table has some demographic info: birthday, name, medical
record number, etc..
The "Medinfo" table has date/time of admission and date/time of discharge
(amongst other data)
I am looking for patients who bounceback to the PICU in less than 24
hours
after discharge
The data is there, I should be able to retrieve it.

First I query the two tables mentioned above and I get a list of all
patients admitted within a specified timeframe (the user chooses this
prior
to launching the query).
The resulting table contains the unique identifiers, medicalrecord
number,
date/time of admission and date/time of discharge (etc..)
Because this table is the result of a query, it has no key fields or
indexes.

Now, finally, my problem.
I was advised to use setrange on the medical record number so all the
admissions from each patient can be examined and I can find out if any
patients "bounce back" within a specified period of time (also pre-set by
the user).

How can I use setrange on a table which as no index set?

My assumption is that this is probably simple, I just can't figure it
out.
Thanks for your help yet again,

Craig Futterman






.