🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #10995

Re: Learning Interbase "style"

#10995
From: Wayne Niddery [TeamB]
Date: Sat, 21 Dec 2002 14:34
40 lines
2650 bytes
"Bradley J. Bell" <bradleyjbell@attb3i.c1o2m> wrote in message
news:3e041ac9$1@newsgroups.borland.com...
>
> I'm having one heck of a time trying to learn Interabase's SQL syntax,
> Interbase's "way" of doing things. I have been unable to find one
Interbase
> programming book. What little I've learned is from searching Deja.com, but
> it takes a long time just to learn how to do simple things.
>
> Can anyone point me to a good book or website that teaches Interbase
> "style"?

Anywhere that teaches SQL-92 standard SQL is pretty good - Interbase is
quite compliant. For example it uses full join syntax (INNER | OUTER LEFT |
RIGHT).

> p.s. Just as a second question; in Sybase I can insert new records into a
> database with a unique key and not worry about duplicates by including
"with
> ignore dups" when defining the index. Does Interbase have a similar
option.
> Right now what I've been doing is to take all the possible new entries
from
> my source table and deleting any entries that already exisit in the
> destination table. There has to be a better way (I hope).

For performance this is best served using a stored proc where you can test
like this:

  if (exists(select * from table where myuniquekey = :keyparam)) then
    update table set ...
  else
    insert into table ...;


--
Wayne Niddery - Logic Fundamentals, Inc. (www.logicfundamentals.com)
RADBooks: http://www.logicfundamentals.com/RADBooks/delphibooks.html
"The only reason some people get lost in thought is because it's unfamiliar
territory." - Paul Fix
Technical Details
Message-ID: <3e047c85$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3e041ac9$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 114a0e,8dcbdc28ad264e66
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-21 06:40:05 PST
From: "Wayne Niddery [TeamB]" <wniddery@chaff.aci.on.ca>
Newsgroups: borland.public.interbase.sql
References: <3e041ac9$1@newsgroups.borland.com>
Subject: Re: Learning Interbase "style"
Date: Sat, 21 Dec 2002 09:34:19 -0500
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 209.50.82.158
Message-ID: <3e047c85$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1040481413 209.50.82.158 (21 Dec 2002 06:36:53 -0800)
X-Authenticated-User: wniddery
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!fr.usenet-edu.net!usenet-edu.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail