On Thu, Mar 10, 2005 at 13:22:05 +0100,
Karsten Hilbert <[EMAIL PROTECTED]> wrote:
>
> Also notice that we do have views that display the missing
> shots per schedule per patient. I just have not found a way to
> join the two views (that is, given and missing) because that
> would AFAICT require
> You can look up our complete schema in our Wiki:
>
> http://salaam.homeunix.com/twiki/bin/view/Gnumed/WebHome
>
> Go to Deverloper Guide -> Database Structure.
http://salaam.homeunix.com/twiki/bin/view/Gnumed/DatabaseSchema
is more convenient for you guys.
Karsten
--
GPG key ID E4071346 @
> 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",
I want to be able to display "shot 4: ..." and "shot 5: ..." in
the application but pull the data from the database, not
calculate it in the a
# [EMAIL PROTECTED] / 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 origin
I figured it out, maybe is not the most elegant way but it work for my
case where only small sets are retrieved
create table foo2 (pk int, valor numeric(12,2), porce numeric(5,2));
insert into foo2 values (1,7893.45,0.4);
insert into foo2 values (5,7893.45,0.3);
insert into foo2 values (9,7893.45
> > 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.
>
> That sounds like you are trying to abuse the data
> > 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.
>
> For this kind of task you usually want to use a
On Mon, Feb 28, 2005 at 17:46:43 +0100,
Karsten Hilbert <[EMAIL PROTECTED]> wrote:
>
> 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
Karsten Hilbert wrote:
> 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.
That sounds like you are trying to abuse the
> OT: You have other database issues: http://www.gnumed.org/
>
>
> error
> insert into WebLog values(586,31,"2005-02-28","")
> Duplicate entry '2005-02-28' for key 2
>
Yes I do and no I don't. That database underlies a "Wiki"
written by one of our contributors. Nothing directly related
to GnuMed
OT: You have other database issues: http://www.gnumed.org/
error
insert into WebLog values(586,31,"2005-02-28","")
Duplicate entry '2005-02-28' for key 2
On Sun, 27 Feb 2005 18:08:02 +0100, Karsten Hilbert
<[EMAIL PROTECTED]> wrote:
> > > is there a way return a column with the row number autom
> > > > is there a way return a column with the row number automatically
> > > > generated according the way the rows were processed by the query.
> > >
> > > No, but you can easily keep a counter in the client.
> >
> > How, then, do I do it if I "need" the "row number" in a view ?
>
> Keep the co
ROTECTED]>
To: "Peter Eisentraut" <[EMAIL PROTECTED]>
Cc: "josue" <[EMAIL PROTECTED]>;
Sent: Saturday, February 26, 2005 1:27 AM
Subject: Re: [GENERAL] row numbering
If you insert the results of your query into a table with a serial
column, the serial column wil
NTPT wrote:
> Having some sort of line numbering in result query would be nice...
The query result has line numbering. How else are you accessing the
individual rows?
Is the issue really that you want psql to number the lines on display?
That could be implemented.
--
Peter Eisentraut
http:
> > is there a way return a column with the row number automatically
> > generated according the way the rows were processed by the query.
>
> No, but you can easily keep a counter in the client.
How, then, do I do it if I "need" the "row number" in a view ?
Karsten
--
GPG key ID E4071346 @ wwwk
Jeff Davis wrote:
Here's an example using plperl and global variables. The variables are
local to a session so you don't have to worry about the counters
interfering. If you need two counters in a session, just execute
reset_counter().
CREATE OR REPLACE FUNCTION reset_counter() RETURNS INT AS $$
$_
Here's an example using plperl and global variables. The variables are
local to a session so you don't have to worry about the counters
interfering. If you need two counters in a session, just execute
reset_counter().
CREATE OR REPLACE FUNCTION reset_counter() RETURNS INT AS $$
$_SHARED{counter}
josue <[EMAIL PROTECTED]> writes:
> to something like:
>
> select counter(),a,b from foo;
The OLAP SQL Standard way to spell this is "ROW_NUMBER() OVER ()".
Postgres doesn't have any support for any of the OLAP features however. It
would be really nice because they're nigh impossible to emulat
If you insert the results of your query into a table with a serial
column, the serial column will do what you want..
On Sat, 2005-02-26 at 01:10 +0100, Peter Eisentraut wrote:
> josue wrote:
> > is there a way return a column with the row number automatically
> > generated according the way the ro
josue wrote:
> is there a way return a column with the row number automatically
> generated according the way the rows were processed by the query.
No, but you can easily keep a counter in the client.
--
Peter Eisentraut
http://developer.postgresql.org/~petere/
---(end o
Marcin Inkielman writes:
> that is exactly i want to obtain. i would like to have:
>
> 1 | first item
> 2 | second,
> 3 | ... and so on.
>
> each time i do a select on a table and aways starting with a "1".
That is really something you should do on the front-end side, the backend
has no notion
Hi!
thanks for your respose!
sorry if i was not very clear with my question...
On Wed, 10 May 2000, Peter Eisentraut wrote:
> Marcin Inkielman writes:
>
> > how may i easyly obtain row numbers in a query:
>
> In the SQL data model, rows don't have numbers, because rows aren't
> ordered -- a
22 matches
Mail list logo