Re: [SQL] inverse of day of year

2004-03-23 Thread Martin Marques
El Lun 22 Mar 2004 12:56, Dana Hudes escribió: If you have the option to handle the date manipulation in Perl use the DateTime modules. Also see Date::Calc. NO! Actualy what I'm doing is getting out of that (I'm using PHP's PEAR Date::Calc) by creating some nice SQL and PL/PgSQL functions in

Re: [SQL] Sorting an aggregated column

2004-03-23 Thread Tom Lane
David Witham [EMAIL PROTECTED] writes: So I see that there is the extra sort above the sub-query that wouldn't be there using 7.4. Are you saying that the sort by survey after the sort by survey,question would potentially reorder the records initially sorted by survey,question? Exactly. Most

Re: [SQL] fine grained trigger time specification...

2004-03-23 Thread Erik Thiele
On Tue, 23 Mar 2004 10:17:31 -0600 Bruno Wolff III [EMAIL PROTECTED] wrote: On Tue, Mar 23, 2004 at 15:19:13 +0100, Erik Thiele [EMAIL PROTECTED] wrote: now sadly i am getting this kind of problem: zeit= insert into a select nextval('delmeseq'),personalnumber,datum,datum from

Re: [SQL] fine grained trigger time specification...

2004-03-23 Thread Bruno Wolff III
On Tue, Mar 23, 2004 at 15:19:13 +0100, Erik Thiele [EMAIL PROTECTED] wrote: now sadly i am getting this kind of problem: zeit= insert into a select nextval('delmeseq'),personalnumber,datum,datum from calendar where type=10409; INSERT 0 581 -- see, 581 inserts which is pretty much :)

Re: [SQL] fine grained trigger time specification...

2004-03-23 Thread Stephan Szabo
On Tue, 23 Mar 2004, Erik Thiele wrote: On Tue, 23 Mar 2004 10:17:31 -0600 Bruno Wolff III [EMAIL PROTECTED] wrote: On Tue, Mar 23, 2004 at 15:19:13 +0100, Erik Thiele [EMAIL PROTECTED] wrote: now sadly i am getting this kind of problem: zeit= insert into a select

Re: [SQL] [GENERAL] PHP or JSP? That is the question.

2004-03-23 Thread Guy Fraser
Yes java is compiled, and compilers do catch most syntax and scope errors, as I said, but the java object code is still interpreted. Logical errors and other mistakes still get through compilation, and good regression testing is still required for quality assurance. I think JSP is an excelent

[SQL] SQL Query

2004-03-23 Thread beyaNet Consultancy
Hi, I am trying to create a query which basically goes along the lines of: x-tad-biggerINSERT INTO tableX ( COL1, COL2 ) VALUES ( x, y ) where COL1 !=x and COL2 !=Y So, insert a record into tableX where there is not already an existence of COL1 and COL2 Can this be done as I have described or

Re: [SQL] SQL Query

2004-03-23 Thread Bruno Wolff III
On Tue, Mar 23, 2004 at 20:02:32 +, beyaNet Consultancy [EMAIL PROTECTED] wrote: Hi, I am trying to create a query which basically goes along the lines of: INSERT INTO tableX ( COL1, COL2 ) VALUES ( x, y ) where COL1 !=x and COL2 !=Y So, insert a record into tableX where there is

[SQL] move forward 0 from foo;

2004-03-23 Thread Chester Kustarz
I expected MOVE FORWARD 0 FROM foo; to always return 0, but I have found this not to be the case. Could anybody comment whether this is expected: mow=# begin; BEGIN mow=# create table a (a integer); CREATE TABLE mow=# insert into a values ( 1 ); INSERT 1823482 1 mow=# insert into a values ( 1 );

Re: [SQL] move forward 0 from foo;

2004-03-23 Thread Tom Lane
Chester Kustarz [EMAIL PROTECTED] writes: I expected MOVE FORWARD 0 FROM foo; to always return 0, but I have found this not to be the case. You are misinterpreting the output. The result is the number of rows that would have been returned by a FETCH with the same parameters. FETCH 0 means

Re: [SQL] function definition documentation

2004-03-23 Thread Gregory S. Williamson
Thanks muchly for the excellent tip. Lots of useful references there. I seem to have battled through this thicket -- onwards ! Greg -Original Message- From: Richard Huxton [mailto:[EMAIL PROTECTED] Sent: Tuesday, March 23, 2004 12:09 AM To: Gregory S. Williamson; [EMAIL PROTECTED]