>Basically, here's the *pseudo* code for what I'm trying to do in
>this particular procedure. If someone would be kind enough to
>suggest the proper way to accomplish this in an Informix stored
>procedure, I'll be very grateful:
>
>SELECT quantity FROM history
> WHERE history.sku = sku AND history.date = date;>
>IF no record found
> INSERT new record into history table
>ELSE
> UPDATE quantity in existing record in history table
Dear Andrew,
As an old and wizend (*not* wise!) programmer, I would INSERT and if the
INSERT failed on a -239 error (Duplicate value in unique key), I would UPDATE.
HTH.
--
Cheers,
Billy
-----------------------------------------------------------------------------
INCLUDE "Disclaimer.4gh" -- my opinions are
INCLUDE "FlamesToDevNull.4gh" -- flamers, eat my shorts!
INCLUDE "CaveatEmptor.4gh" -- take my advice at your own risk
INCLUDE "ThirtySomething.4gh" -- header file for this class
-- Written by : Billy Wheeler, Date: today
-- Copyright (c) 1995, The West Solutions Group