Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!killer!ames!lll-tis!lll-winken!uunet!mcvax!philmds!leo
From: leo@philmds.UUCP (Leo de Wit)
Newsgroups: comp.databases
Subject: Re: Comparing screen values in Oracle
Keywords: Oracle SQL*forms
Message-ID: <558@philmds.UUCP>
Date: 9 Jul 88 07:05:44 GMT
References: <275@jackson.UUCP>
Reply-To: leo@philmds.UUCP (Leo de Wit)
Organization: Philips I&E DTS Eindhoven
Lines: 21

In article <275@jackson.UUCP> egranthm@jackson.UUCP (Ewan Grantham) writes:
>We are setting up a banking transaction form using SQL*Forms in
>Oracle. In one of our triggers we are comparing one screen value to
>another. Is there anyone out there who knows if Oracle permits this?
>We seem to be having trouble with it, and would like to know if that's
>the reason why.

You should have mentioned the way in which you compare, because it
should of course work. Whatever may be the cause in your case, the
following works (assuming the two values are in one block called blk
and named val1 and val2 resp):

select 'x' from dual
where :blk.val1 = :blk.val2

The trigger fails if the values are different.

I think the trigger mechanism using SQL is quite powerful; I built an
entire application and didn't have to resort to host language user
exits.

        Leo.