[SQL] xml perl & pgsql

2000-10-12 Thread Philip Cook
Dear Postgresql Users Can any one tell me where I can find some XML to Postgresql routines written in Perl. Thanks in advance for your help and assistance. Regards Philip

Re: [SQL] Standard syntax?

2000-10-12 Thread Tom Lane
"Franz J Fortuny" <[EMAIL PROTECTED]> writes: > I have been using (with success) this SQL statement in PostgreSQL: > select col1, > case when col2 = true then > col3 > else > col4 > end as colw, > colM > where etc. > The above syntax, however, does not work

Re: [SQL] Standard syntax?

2000-10-12 Thread Peter Eisentraut
Franz J Fortuny writes: > select col1, > case when col2 = true then > col3 > else > col4 > end as colw, > colM > where etc. > is this a "standard" or ANSI 9X compatible syntax Yes. -- Peter Eisentraut [EMAIL PROTECTED] http://yi.org/peter-e/

Re: [SQL] if else query help

2000-10-12 Thread John McKown
On Thu, 12 Oct 2000, Jean-Christophe Boggio wrote: > portion of the day (although I don't know --yet-- how to convert > date2-date1 to an integer, trunc does not work). reltime(date2-date1)::int Will subtract date1 from date2, then cast it to an integer. John

Re: [SQL] Standard syntax?

2000-10-12 Thread Jie Liang
Hi, This is not SQL92, I believe it's an extention of Pg , Oracle uses 'decode' to implement if-then elsif then-else structure. Franz J Fortuny wrote: > I have been using (with success) this SQL statement in PostgreSQL: > > select col1, > case when col2 = true then > col3 > e

Re: [SQL] Standard syntax?

2000-10-12 Thread Tomas Berndtsson
"Franz J Fortuny" <[EMAIL PROTECTED]> writes: > I have been using (with success) this SQL statement in PostgreSQL: > > select col1, > case when col2 = true then > col3 > else > col4 > end as colw, > colM > where etc. > > The above syntax, however, does no

Re: [SQL] Standard syntax?

2000-10-12 Thread Josh Berkus
Franz, You'd better stay away from that syntax if you want to make your applications portable. I can tell you that it won't work on MS SQL Server or MySQL. I can't speak for Oracle. -Josh Berkus P.S. Thanks for the nifty construction ... I wouldn't have thought of it! -- __AGLIO DATABAS

[SQL] Standard syntax?

2000-10-12 Thread Franz J Fortuny
I have been using (with success) this SQL statement in PostgreSQL: select col1, case when col2 = true then col3 else col4 end as colw, colM where etc. The above syntax, however, does not work for Interbase (6.01). For those who have had experience in other

Re: [SQL] if else query help

2000-10-12 Thread Jie Liang
Hey, there, This is very interesting. I have similar problem: I want drop some junky table in my database, how can I detect a table when last time it is used. I try to say that I want to know how long this table has NOT been used at all. I don't which system table holds this statistics. Josh Be

Re: [SQL] if else query help

2000-10-12 Thread Josh Berkus
Brian, Jean-Christophe, >Someone corrects me if I'm wrong, I come from the Oracle world... > > Dates (or I should say TimeStamps) are stored as floating point values > : the integer part is the number of days since a certain date > (epoch or 01/01/1970 on unix-based databases) and the fractionna

Re: [SQL] if else query help

2000-10-12 Thread Jean-Christophe Boggio
hi Brian, BCD> I need to write a query that will pull information from table2 if BCD> information in table1 is older then xdate. BCD> My laymen example: BCD> SELECT table2.date, count(table2.name) as count BCD> WHERE table1.startdate > 2 weeks BCD> AND table2.submitdate > 2 weeks BCD> ; BCD>

Re: [SQL] dynamic object creation

2000-10-12 Thread Mark Volpe
You may want to think about creating your table like this (for example): CREATE TABLE data ( key text, field_type char, value text ); CREATE UNIQUE INDEX data_key ON data(key, field_type, value); So this way each "record" takes up several rows in the table, and each "fie

[SQL] if else query help

2000-10-12 Thread Brian C. Doyle
Hello all, I need to write a query that will pull information from table2 if information in table1 is older then xdate. My laymen example: SELECT table2.date, count(table2.name) as count WHERE table1.startdate > 2 weeks AND table2.submitdate > 2 weeks ; So i Guess my real questions is how do

[SQL] set digest

2000-10-12 Thread karasiov
set digest

[SQL] dynamic object creation

2000-10-12 Thread Indraneel Majumdar
Hi, I'm not sure if the subject line has been proper. I have this following problem which I hope PostgreSQL can handle. I'm converting a complex flatfile where records are arranged serially. some fields are as 'n' times repeating blocks of multiple lines. Some subfields within these are also 'n'