[SQL] INSERT INTO...RETURNING vs SELECT

2010-04-06 Thread Cliff Wells
M accounts WHERE name='test 1'), 'test 2'); As far as I can see, INSERT INTO...RETURNING is semantically equivalent to SELECT...FROM with a side-effect, so it seems this construct should work. Can someone shed some light? Regards, Cliff -- Sent via pgsql-sql mailing list (pg

Re: [SQL] INSERT INTO...RETURNING vs SELECT

2010-04-05 Thread Cliff Wells
On Mon, 2010-04-05 at 09:10 +0200, Andreas Kretschmer wrote: > Cliff Wells wrote: > > > As far as I can see, INSERT INTO...RETURNING is semantically equivalent > > to SELECT...FROM with a side-effect, so it seems this construct should > > work. Can someone shed some

[SQL] INSERT INTO...RETURNING vs SELECT

2010-04-04 Thread Cliff Wells
M accounts WHERE name='test 1'), 'test 2'); As far as I can see, INSERT INTO...RETURNING is semantically equivalent to SELECT...FROM with a side-effect, so it seems this construct should work. Can someone shed some light? Regards, Cliff -- Sent via pgsql-sql mailing list (pg

Re: [SQL] Home-brewed table syncronization

2003-07-09 Thread Cliff Wells
hange from time-to-time, but just the process of determining > what is different may take more effort than simply rebuilding. Keep a timestamp associated with each record. Only update the records with timestamps later than your last sync. -- Cliff Wells, Software Engineer Logiplex Corporatio

[SQL] integrity of column used to order rows

2003-03-19 Thread cliff
o go through what might become a large table only to work on a small part of it (ie, records with the same parent_id)? I have a lot of experience with mySQL but a lot of these more sophisticated pgSQL features are a little tough for me to get a handle on immediately... thanks very much. -Cliff -

Re: [SQL] [ADMIN] Incredible..

2002-06-21 Thread Cliff Wells
On Fri, 21 Jun 2002 09:57:20 -0500 Luis Andaluz P, wrote: > Hello, > see this interesting file. > Bye. > And see this interesting URL: http://www.brocku.ca/its/helpdesk/virusalerts/viruses.phtml?vid=75 -- Cliff Wells, Software Engineer Logiplex Corporation (www.logiplex.net) (5

Re: [SQL] skip weekends

2002-06-21 Thread Cliff Wells
use Python a lot outside of PG and it's an excellent language. http://developer.postgresql.org/docs/postgres/plpython.html Regards, Cliff ---(end of broadcast)--- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html

Re: [SQL] Newbie ex-Oracle person's question: Oracle ROWID = PSQL OID, Orac le ROWNUM = PSQL ???

2001-05-11 Thread Cliff Crawford
the ORDER BY, which is not of much use as adding an ORDER > BY jumbles them up. Duh! LIMIT in PostgreSQL applies *after* ORDER BY, so you won't have this problem :) -- Cliff Crawford http://www.sowrong.org/ birthday party cheesecake jellybean BOOM ---(e

Re: [SQL] Dateadd

2001-05-04 Thread Cliff Crawford
:date + '2 months 10 days'::interval; ?column? 2000-03-11 00:00:00-05 (1 row) -- Cliff Crawford http://www.sowrong.org/ birthday party cheesecake jellybean BOOM ---(end of broadcast)--- TIP 5: Have y

Re: [SQL] SQL Dummy Needs Help

2001-03-12 Thread Cliff Crawford
* Cliff Crawford <[EMAIL PROTECTED]> menulis: > > SELECT table2.title_no, table2.paidto_date > FROM table1, table2 > WHERE table1.title_no=table2.title_no > AND (date_part('month', table1.effect_date) != > date_part('month',

Re: [SQL] SQL Dummy Needs Help

2001-03-12 Thread Cliff Crawford
27;month', table1.effect_date) != date_part('month', table2.paidto_date) OR date_part('day', table1.effect_date) != date_part('day', table2.paidto_date)); (At least, I think that will work, but I never trust any SQL I write without thorou