Re: [SQL] Transpose rows to columns

2004-01-12 Thread Michael Glaesemann
Hi David On Jan 13, 2004, at 10:12 AM, David Witham wrote: Hi, I have a query that returns data like this: cust_id cust_name month costrevenue margin 991234 ABC 2003-07-01 10 15 5 991234 ABC 2003-

[SQL] Transpose rows to columns

2004-01-12 Thread David Witham
Hi, I have a query that returns data like this: cust_id cust_name month costrevenue margin 991234 ABC 2003-07-01 10 15 5 991234 ABC 2003-08-01 11 17 6 991234 ABC

Re: [SQL] Unique key field or serverl fks ?

2004-01-12 Thread katarn
Hi, I would like to know opinions about which approach is better: Having a table with a field that works as a unique key, or having several fks that work as a combined key ( all the fks fields )? Depends on the particular situation, you'll need to give details of the tables and their place

Re: [SQL] Triggers

2004-01-12 Thread Richard Huxton
On Monday 12 January 2004 16:14, beyaRecords - The home Urban music wrote: > Hi, > does postgresql support the ability to email as in SQL Server? I want > to create a trigger which on input of a record will send out an email. > Is this possible? Have a look in the mailing list archives - this has

Re: [SQL] Adding a column to a VIEW which has dependent objects.

2004-01-12 Thread scott.marlowe
On Sat, 10 Jan 2004, Tom Lane wrote: > Rajesh Kumar Mallah <[EMAIL PROTECTED]> writes: > > How do people extend a parent view which has > > lot of dependent views? > > The parent view cannot be dropped because that will > > require recreating a dozen of dependent views. > > You're out of luck, yo

Re: [SQL] Triggers

2004-01-12 Thread Sai Hertz And Control Systems
Dear Uzo , Hi, does postgresql support the ability to email as in SQL Server? I want to create a trigger which on input of a record will send out an email. Is this possible? http://pgmail.sourceforge.net/ is what you need. Regards, Vishal Kashyap ---(end of broadcast)

Re: [SQL] Triggers

2004-01-12 Thread Peter Eisentraut
beyaRecords - The home Urban music wrote: > does postgresql support the ability to email as in SQL Server? I want > to create a trigger which on input of a record will send out an > email. Is this possible? Write a trigger function in, say, PL/PerlU or PL/sh and have it send the email with the us

[SQL] Triggers

2004-01-12 Thread beyaRecords - The home Urban music
Hi, does postgresql support the ability to email as in SQL Server? I want to create a trigger which on input of a record will send out an email. Is this possible? Uzo ---(end of broadcast)--- TIP 3: if posting/reading through Usenet, please send a

Re: [SQL] Problem with NOT IN portion of query.

2004-01-12 Thread Robert Creager
When grilled further on (Mon, 12 Jan 2004 07:28:09 +0100), Tomasz Myrta <[EMAIL PROTECTED]> confessed: > Dnia 2004-01-12 05:04, U¿ytkownik Robert Creager napisa³: > > > > SELECT date_trunc( 'hour', "when" )::timestamp AS > > period FROM readings WHERE period NOT IN (SELECT "time" FROM > > hour.su

Re: [SQL] Unique key field or serverl fks ?

2004-01-12 Thread Richard Huxton
On Monday 12 January 2004 05:51, katarn wrote: > Hi, > > I would like to know opinions about which approach is better: > > Having a table with a field that works as a unique key, or having > several fks that work as a combined key ( all the fks fields )? Depends on the particular situation, you'll

Re: [SQL] Select into

2004-01-12 Thread Richard Huxton
On Monday 12 January 2004 01:09, beyaRecords - The home Urban music wrote: > Hi, > I want to copy a sequence of rows from one table into another table. I > have tried select into but this will only work if the table you are > copying to does not already exist. How do I copy to a table that does > a

[SQL] Insert into

2004-01-12 Thread azwa
Hi,   i've structure table like below and want to load data from temp table into table below :     dwnc=> \d cust_lo_dim                           Table "biosadm.cust_lo_dim"   Column   |         Type          |                 Modifiers ---+---+--