Re: ORACLE FORMS QUERY QUESTION

From: <hatzinger_m_at_bmwf1f.bmwf.gv.at>
Date: 19 Apr 93 15:09:20 +0100
Message-ID: <1993Apr19.150921.74_at_bmwf1f.bmwf.gv.at>


In article <1993Apr18.185648.25378_at_dxcern.cern.ch>, ezharkov_at_dxcern.cern.ch (Eugeny Jarkov) writes:
> Hello!
>
> While in enter query mode the SQL*Forms Operator is allowed to type something
> like "#in (value1, ...)" or "> n" into the NUMBER field.
>
> Can somebody suggest a way to do the same somewhere in PRE-QUERY trigger?
>
> Thanks.
>
> Eugeny Zharkov.

-- 

You can do it the same way:

e.g.

PRE-QUERY

:block.dbfield := '# IN (SELECT field FROM table ......)';

Be shure that the query length of field ":block.dbfield" is long enough to
hold the query text.

If you want to include some field from the base table :

:block.dbfield := '# IN (SELECT field FROM table
                          WHERE another_field = forms_basetable.field);

If you want to include some values from other fields :

:block.dbfield := '# IN (SELECT field FROM table
                          WHERE another_field = '''||:block.any_field||''')';

or

:block.dbfield := '# IN (SELECT field FROM table
                          WHERE another_field = '||:block.num_field||')';

kind regards

Mike

================================================================================
                                                                          ^
 Federal Ministry of Science and Research                               B | M
<-------------------------------------------------------------------------+---->
 Computer Center                                                        W | F
                                                                          |
 Ing. Klaus-Michael Hatzinger       mail: hatzinger_m_at_mail.bmwf.gv.at     |
 Bankgasse 1/209                   phone: 0043-222-53120/5188             |
 1014 Vienna, Austria                fax: 0043-222-53120/5180             V
================================================================================
Received on Mon Apr 19 1993 - 16:09:20 CEST

Original text of this message