Hello everyone.
I'm experiencing some doubts regarding a procedure i have (.c compiled
as .so) running as an 'after insert for each row' trigger.
This trigger is supposed to do a simple query, something like
SELECT * FROM table order by id where processed=0 limit 1
It's not the perfect way to
On 8/25/2004 10:21 AM, Pedro B. wrote:
Hello everyone.
I'm experiencing some doubts regarding a procedure i have (.c compiled
as .so) running as an 'after insert for each row' trigger.
This trigger is supposed to do a simple query, something like
SELECT * FROM table order by id where processed=0
I have a table of people (reviewers), a table of review assignments
(assign), and a table of review acceptances (accept). I would like to
be able to write a query to return the latest (e.g., max(assign_date))
assignment for each reviewer, plus the acc_id field from accept. I
think I should be
Andrew,
I have a table of people (reviewers), a table of review assignments
(assign), and a table of review acceptances (accept). I would like to
be able to write a query to return the latest (e.g., max(assign_date))
assignment for each reviewer, plus the acc_id field from accept. I
think I
Andrew,
If assing is not a many to many relation,
why did you not fold accept_id into assign?
Any way, here is the query you need:
select assign.reviewer_id, ss.max_assign_date,
accept.assign_id, accept.accept_id
from (
select reviewer_id, max( assign_date) as max_assign_date
from assign
Excellent - thanks, Josh!
--
Andrew J Perrin - http://www.unc.edu/~aperrin
Assistant Professor of Sociology, U of North Carolina, Chapel Hill
[EMAIL PROTECTED] * andrew_perrin (at) unc.edu
On Wed, 25 Aug 2004, Josh Berkus
I have two tables. One is test_main, and second is named result. Also I have
view which summarizes results from test_main table and groups them by ID
column:
CREATE TABLE test_main(id varchar(4), value int4);
CREATE TABLE result(id varchar(4), value int4);
CREATE VIEW
That 'running aggregate' notion comes up quite regularily,
and it has a number of nonintuitive holes, to do with
what happens when your ordering allows for ties.
ASTRID had it, RedBrick SQL had it, the latest MSSQL
has it ... not necessarily a recommendation.
Tom Lane wrote:
David Garamond [EMAIL
Hi Gurus,
Please forgive this naive question:
Say, I have a table (containerId, itemId) where for each containerId there
are several rows (different itemId value) in that table. Now I want to give
those rows (with same containerId) a sequence, so add one colum there to
make it become
Hi,
I have a table where in lot of triggers were included in that as shown
below. How to view/access triggers and procedures from postgresql.
I am using postgresql 7.4.1 on solaris.
regds
-raju
Process=# \d reviews
Table public.reviews
Column
Below is a copy of my sql sentence including the error I am getting. What
does the error mean? What have I done wrong?
kathrirs=# insert into faglaerer
kathrirs-# values ('f-001', '13056802876', 'Petter Lær',
lo_import('/home/studenter/it03/kathrirs/img/img01.jpg'),
kathrirs(# '2001-12-25', 100,
Sascha Ziemann [EMAIL PROTECTED] writes:
I would like to define a
new type VARCHAR2 which should behave exactly like VARCHAR.
You could get about halfway there with
CREATE DOMAIN varchar2 AS varchar;
But it's only halfway because the domain will not accept length
decorations; that is
Kathrine S [EMAIL PROTECTED] writes:
Below is a copy of my sql sentence including the error I am getting. What
does the error mean? What have I done wrong?
kathrirs=# insert into faglaerer
kathrirs-# values ('f-001', '13056802876', 'Petter Lær',
On Wednesday 25 August 2004 07:21 pm, Tom Lane wrote:
Kathrine S [EMAIL PROTECTED] writes:
Below is a copy of my sql sentence including the error I am getting. What
does the error mean? What have I done wrong?
kathrirs=# insert into faglaerer
kathrirs-# values ('f-001', '13056802876',
Adrian Klaver [EMAIL PROTECTED] writes:
I don't know what to make of it but the problem seems to start at the lines I
have marked 1 2 and involves the lo_import function. I have not used
lo_import and so do not know how to call it. What I do see is that it is
called at 1 and a '(' shows
15 matches
Mail list logo