Subject Re: [IB-Architect] REPLACE (Was Re: proc directory type information tables)
Author Jim Starkey
At 09:36 PM 2/10/01 -0000, dianeb77@... wrote:
>
>Not that anyone would care, but there was a proposal from ANSI to add
>a statement to standard SQL, post SQL99, with a similar function but
>different name -- the keyword they chose was MERGE.
>
>I don't know if the ANSI proposal has been accepted or not, but the
>preamble to the proposal described the statement as follows:
>
>"Given a target and source table and a predicate, <merge statement>
>updates the rows in the target table that match the rows in the
>source
>table with the values in the corresponding matching rows and inserts
>rows from the source table that do not match any rows in the target
>table. Users can control whether only updates, only inserts or both
>updates and inserts happen."
>

Grumph. Recognizing that the preample isn't a definitive
description, here are a few problems.

1. As described, it requires a source table. What if a
host program wanted to execute the verb. I use
REPLACE in a restore subsystem (modes of replace,
merge, and override), but the data's coming from
a file.

2. A user doesn't need to control "only inserts" since
that functionality exists in INSERT ... SELECT.

3. A user shouldn't need to control "only updates"
since that functionality belongs on the UPDATE
statement.

In my mind the proposal is insufficient, unnecessary
complex, duplicates existing functionality, and doesn't
address a well understood deficiency.

If they were my undergraduates, I'd suggest a change in
major. Experimental farming, perhaps. Maybe computational
fish farming...

Jim Starkey