Re: USE OF COPY COMMAND IN SQL*FORMS 3.0

From: Steven Whatley <swhatle_at_starbase.neosoft.com>
Date: 14 Jan 1995 02:31:02 GMT
Message-ID: <3f7d16$np3_at_uuneo.neosoft.com>


snarasim (snarasim_at_ingr.com) wrote:
: Does anyone know the use of '#' in a COPY command ?????
:
: e.g. COPY ('#=ENAME and upper(ENAME)= '''|| upper(:ENAME) || '''',
: ':ENAME');
:
: The above question arises as the same result can be achieved with
:
: COPY ('=ENAME and upper(ENAME)= '''|| upper(:ENAME) || '''',
: ':ENAME');
The '#' character has nothing to do with the COPY command. What is happening is that the text including the '#' into a field in a PRE-QUERY trigger. '#' as the first character in field text tells Forms to insert the text into the WHERE clause of the query which Forms is constructing. Forms will start the clause with ENAME for you atuomatically.

Let's say the value in :ENAME was 'John' the following condition will be generated:

        ENAME=ENAME and upper(ENAME)= upper('John')

This clause performs a case-insensitive query. The '#' character makes this all possible. The only disadvantage is that if there is an index on ENAME, it will not be used.

Hope this helps.

Later,
Steven

 _   _  _ _  __ : Steven Whatley              \ The opinions expressed are my
|_  |_|  |  |   : System Analyst/Programmer    \ own.  You may freely copy,
 _| | | _|_ |__ : swhatle_at_starbase.neosoft.com  \_use,_or_ignore_them._______
                : Oracle CDE2 Ambassador: Feel free to ask questions about CDE2!
Scientific Applications International Corporation (An employee-owned company) Received on Sat Jan 14 1995 - 03:31:02 CET

Original text of this message