Re: [SQL] Transpose rows to columns

2004-01-18 Thread Luis C. Ferreira (aka lcf)
El Lun 12 Ene 2004 22:12, David Witham escribió: >DW: Hi, >DW: >DW: I have a query that returns data like this: >DW: >DW: cust_idcust_name month costrevenue margin >DW: 991234 ABC 2003-07-01 10 15 5 >DW: 991234

Re: [SQL] Rule won't let me NOTIFY, no matter how hard I try

2004-01-15 Thread Luis C. Ferreira
El Mar 13 Ene 2004 18:07, Jeff Boes escribió: >JB: Here's the setup: I wanted to write a rule that would fire on an update >JB: to one table, and do an update to another table, followed by a notify. >JB: My first attempt wasn't acceptable to PG (7.3.4): >JB: >JB: create rule "my_rule" as >JB: on up

Re: [SQL] Transpose rows to columns

2004-01-14 Thread Luis C. Ferreira (aka lcf)
El Lun 12 Ene 2004 22:12, David Witham escribió: >DW: Hi, >DW: >DW: I have a query that returns data like this: >DW: >DW: cust_idcust_name month costrevenue margin >DW: 991234 ABC 2003-07-01 10 15 5 >DW: 991234

[SQL] Re: enumerating rows

2001-04-13 Thread Luis C. Ferreira
Try this CREATE SEQUENCE just_a_seq; Select nextval('just_a_seq') as row_no, * from pg_tables ; drop SEQUENCE just_a_seq; > > row_no | column1 | column2 | ... > ---+-+-+ ... > 1 | datum11 | datum12 | ... > 2 | datum21 | datum22 | ... >... | ... | ..