Re: SQL Programming Question

Поиск
Список
Период
Сортировка
От Martin Gainty
Тема Re: SQL Programming Question
Дата
Msg-id BLU142-W9976A68BF93A7164AD98BAE750@phx.gbl
обсуждение исходный текст
Ответ на SQL Programming Question  (tony@exquisiteimages.com)
Ответы Re: SQL Programming Question  (Darren Duncan <darren@darrenduncan.net>)
Список pgsql-general
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 vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.

Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.




 
> Date: Fri, 10 Sep 2010 23:07:11 -0400
> Subject: [GENERAL] SQL Programming Question
> From: tony@exquisiteimages.com
> To: pgsql-general@postgresql.org
>
> 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. These transactions should only be imported into
> my system once, but the vendor system will occasionally resend a
> transaction by mistake.
>
> The way I am currently handling this with Micorosft ADO and FoxPro files
> is to open a table with an index on the vendor key and seek on the key. If
> there is no match I add it, if there is a match I put it in an exception
> file to be manually checked.
>
> 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 handling this task?
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

В списке pgsql-general по дате отправления:

Предыдущее
От: 夏武
Дата:
Сообщение: Help! pg_dump: Error message from server: ERROR: cache lookup failed for type 19
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Regular expression that splits CSV string into table