From: | Roman Neuhauser <neuhauser(at)chello(dot)cz> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: row numbering |
Date: | 2005-03-09 12:40:38 |
Message-ID: | 20050309124038.GA25290@isis.wad.cz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
# Karsten(dot)Hilbert(at)gmx(dot)net / 2005-03-01 17:41:46 +0100:
> > > There are 5 vaccinations in a given vaccination schedule.
> > >
> > > Patient had 3 shots.
> > >
> > > I want the view to show me that shot 4 and 5 are missing
> > > without having to enter the cardinality of the vaccination in
> > > the original data.
I don't know that much about medicine, so this might be a funny
question, but do you really need to know that "shots 4 and 5 are
missing", or just that the patient needs to be shot two more times,
or do you really want the *application dates*?
> Here is the bit of data that I forgot to mention: Those
> consecutive immunization rows *are* ordered by a sort key that
> the application assigns -- the date of application. So,
> basically, what I want to do is the following (high level):
>
> 1) read given vaccinations from table
> 2) order by date_given
> 3) assign ordinals to the rows in the order obtained by 2)
> 4) deduce missing shots by joining to another table that
> defines the number of vaccinations in a schedule
This is a description of steps you decided would get you to your
goal. Instead of describing the steps, what's the goal?
--
How many Vietnam vets does it take to screw in a light bulb?
You don't know, man. You don't KNOW.
Cause you weren't THERE. http://bash.org/?255991
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2005-03-09 13:16:09 | Re: out of memory problem |
Previous Message | Pruteanu Dragos | 2005-03-09 12:37:41 | out of memory problem |