Re: Minus function in Informix/SQL - How?
Posted in 1995
Anish Maharaj (anish@cs.uct.ac.za) wrote:
: Hello,
: I am using Informix-SQL to perform some benchmarks. I need to use a
: minus function but it appears that there is no standard minus function
: available in Informix. (i.e. a function to subtract one relation from
: another R1-R2).
I was just successfully able to do this:
SELECT cola - colb FROM table
The result was the decremention of cola by colb, as expected.
This also worked:
UPDATE table SET cola = (cola - colb);
Unless I don't know what you mean by a "minus function", this should
work.
=======================================================================
Dennis J. Pimple dennisp@informix.com Opinions expressed
Senior Consultant -------------------- are mine, and do not
Informix Software Inc Voice: 303-850-0210 necessarily reflect
Denver Colorado USA Fax: 303-779-4025 those of my employer.
: At the moment, I am using a delete function but this is extremely
: inefficient since the database is changed and updated.
: Is there a better way of performing such a query using Informix?
: Thank you.
: Anish
: --
: Anish Maharaj E-mail : anish@cs.uct.ac.za
: Database Laboratory Phone : +27 +21 650 4057
: University of Cape Town