Newsgroups: comp.databases
Path: utzoo!utgpu!watserv1!maytag!maytag.waterloo.edu!psalvini
From: psalvini@maytag.waterloo.edu (Paul Salvini)
Subject: ORACLE: SQLFORMS 3.0 Problem-Bug!
Message-ID: <1991Jan31.135725.6241@maytag.waterloo.edu>
Sender: psalvini@maytag.waterloo.edu (Paul Salvini)
Organization: University of Waterloo
Distribution: na
Date: Thu, 31 Jan 91 13:57:25 GMT
Lines: 29

Help!

I am trying to get the following code to work in a trigger-

    select field
    into :screenfield 
    from table
    where table.field like nvl(:screenfield2,'%');

In other words:  If the screen input is blank use the Wildcard to
select all records.

Note: Similar coding works in SQL*Plus
      The trigger compiles fine
      Run-time error of ORA-00920 Invalid relational operator
      Running on Unix Symmetry 

So: Can anyone offer suggestions to this? I have tried other coding
alternatives such as
   where ((table.field = :screenfield2) or (:screenfield2 is null))
BUT
   this does not use an index if the input is given! BAD STUFF!!!

Any and all suggestions appreciated..
-- 
===============================================================================
Paul A. Salvini                                            (519) 884-1973 x2913
Wilfrid Laurier University            ** INTERNET: psalvini@maytag.UWaterloo.ca 
Department of Computing Services
