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
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 @
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 the
# [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 original data.
I
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 left (or
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 model, so I'm
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
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
Eisentraut [EMAIL PROTECTED]
Cc: josue [EMAIL PROTECTED]; pgsql-general@postgresql.org
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 will do what you want..
On Sat, 2005
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 counter in the client as
OT: You have other database issues: http://www.gnumed.org/
snip
error
insert into WebLog values(586,31,2005-02-28,ip addr removed)
Duplicate entry '2005-02-28' for key 2
/snip
On Sun, 27 Feb 2005 18:08:02 +0100, Karsten Hilbert
[EMAIL PROTECTED] wrote:
is there a way return a column with the
OT: You have other database issues: http://www.gnumed.org/
snip
error
insert into WebLog values(586,31,2005-02-28,ip addr removed)
Duplicate entry '2005-02-28' for key 2
/snip
Yes I do and no I don't. That database underlies a Wiki
written by one of our contributors. Nothing directly
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 data
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
the
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 @
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}
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 $$
Hello list,
is there a way return a column with the row number automatically
generated according the way the rows were processed by the query.
For instance:
select a,b from foo;
a b
20 yes
40 no
15 yes
to something like:
select counter(),a,b from foo;
counter a b
1 20 yes
2 40 no
3
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 of
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 rows
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 emulate with
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 query
22 matches
Mail list logo