Re: [SQL] Editor for pgsql

2002-07-22 Thread James Orr
On Monday 22 July 2002 12:27 pm, Josh Berkus wrote: > Me, I use Kate, an MDI text editor from the KDE crew, and CVS for > version control. Thanks, KDE guys!But, after 3 years of Postgres, > I'm pretty fluent in PL/pgSQL. I even double-quote without thinking > about it. How do you use CVS

[SQL] Aggregate binary AND

2001-11-01 Thread James Orr
Hi, Is there an aggregate binary AND function in postgres? If not, is there a way to write your own aggregate functions? Examples? - James ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-loun

Re: [SQL] transposing data for a view

2001-11-01 Thread James Orr
> > BTW, I don't believe the self-join approach proposed > > earlier will work, because joining on "scanid" will > > create a cartesian type join where the region values > > will be duplicated (multiplicated!). > > Not if you're talking about my query, they won't. I use that query form > in many

Re: [SQL] transposing data for a view

2001-10-31 Thread James Orr
- Original Message - From: "H Jeremy Bockholt" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, October 30, 2001 7:36 PM Subject: [SQL] transposing data for a view > I have a generalized table: > > scanid | region | volume > - > 1 A 34.4

Re: [SQL] Search by longitude/latitude

2001-10-08 Thread James Orr
Here is some perl code which does what you want. - Original Message - From: "Chris Ruprecht" <[EMAIL PROTECTED]> To: "pgsql" <[EMAIL PROTECTED]> Sent: Monday, October 08, 2001 8:58 AM Subject: [SQL] Search by longitude/latitude > Hi all, > > I need to implement "Find all hospitals in a

Re: [SQL] Help with SQL statement - Thanks

2001-07-16 Thread James Orr
SELECT * FROM Payments P1 WHERE Date = (SELECT MAX(Date) FROM Payments P2 WHERE P2.CustomerNo = P1.CustomerNo) I think that will do it. - James - Original Message - From: "Henry" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]@postgresql.org> Sent: Saturday, July 14, 2001 3:16 PM Subject: [SQ

Re: [SQL] Referencing a view?

2001-07-13 Thread James Orr
Thanks for all the responses! The one from Grigoriy was particularly interesting, I hadn't thought of that approach. However, I came to the realization that if somebody changes their address, I don't want it to be changed on previous orders. So I think i'll change the orders table to contain th

[SQL] Referencing a view?

2001-07-12 Thread James Orr
Hi,   Is there anyway that you can reference a column in a view for referential integrity?  The problem is with the unique thing, obviously I can't create a unique index on a view.  Here is what I have: CREATE SEQUENCE "addresses_id_seq" start 1 increment 1 maxvalue 2147483647 minvalue 1  c

[SQL] Changing PL/pgSQL triggers

2001-06-21 Thread James Orr
Hi,   What's the easiest way to modify or view a function written in PL/pgSQL?  I've been using pg_dump to get the original function, then dropping and creating the function and trigger after making a change.  Is there an easier way?   -James