Re: [GENERAL] SQL Programming Question

2010-09-11 Thread John R Pierce
On 09/11/10 12:26 PM, Merlin Moncure wrote: On Fri, Sep 10, 2010 at 11:07 PM, wrote: Using PostgreSQL I can't open a table and do seeks against an index. I could do a select against the database and see if 0 records are returned, but that seems to take more time than doing a seek on an index.

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Merlin Moncure
On Fri, Sep 10, 2010 at 11:07 PM, wrote: > Using PostgreSQL I can't open a table and do seeks against an index. I > could do a select against the database and see if 0 records are returned, > but that seems to take more time than doing a seek on an index. Is there a > more SQL friendly way of han

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Darren Duncan
Martin Gainty wrote: -- i usually INSERT the record --then check for PK VIOLATION e.g. IF PK_VIOLATION then UPDATE record is FoxPro still supported??? My understanding is that exception handling carries significant overhead and so doing it within a heavy-iterated loop like this import would p

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Martin Gainty
Hi Tony -- i usually INSERT the record --then check for PK VIOLATION e.g. IF PK_VIOLATION then UPDATE record is FoxPro still supported??? Martin Gainty __ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Alban Hertroys
On 11 Sep 2010, at 12:09, Alban Hertroys wrote: > It would be great to be able to use a WITH statement to lock down a data set > for multiple subsequent operations, something like: > > WITH nonduplicates (key, data1, data2, etc) AS ( > SELECT key, data1, data2, etc FROM staging_table >

Re: [GENERAL] SQL Programming Question

2010-09-11 Thread Alban Hertroys
On 11 Sep 2010, at 6:10, Scott Bailey wrote: > On 09/10/2010 08:07 PM, t...@exquisiteimages.com wrote: >> I have a situation where I receive a file with transactions that have a >> unique key from a vendor. These transactions should only be imported into >> my system once, but the vendor system wi

Re: [GENERAL] SQL Programming Question

2010-09-10 Thread John R Pierce
On 09/10/10 8:07 PM, t...@exquisiteimages.com wrote: Coming from 25 years of programming applications based on dBASE and FoxPro tables, I have a question about how to deal with a programming task. I have a situation where I receive a file with transactions that have a unique key from a vendor.

Re: [GENERAL] SQL Programming Question

2010-09-10 Thread Scott Bailey
On 09/10/2010 08:07 PM, t...@exquisiteimages.com wrote: I have a situation where I receive a file with transactions that have a unique key from a vendor. These transactions should only be imported into my system once, but the vendor system will occasionally resend a transaction by mistake. The w