Re: Forms 4.5 - select question

From: Kevin Muhm <muhmkb_at_maritz.com>
Date: 1996/10/07
Message-ID: <32590D2F.6195_at_maritz.com>#1/1


Kathy, Koehler wrote:
>
> I'm writing a select statement in forms 4.5 where I want to vary the "where"
> clause by using a variable. I have been unable to do this. Can you do this
> and what is the syntax? Here's an example:
>
> select status, id, open_date, owner, queue, short_description,
> cust_priority, ae_incident.prospect_id,major_acct, contact,
> target_code
> from ae_incident, pro_bcs
> "PARAMETER.query_param";
>
> The above did not work.
>
> Thanks,
>
> Kathy

You could use a global variable instead. First define the global, for example -

        :global.where_clause := 'status = ''VALID';

Then set the default where property for the block:

        Set_Block_Property('pro_bcs', DEFAULT_WHERE, :global.where_clause);

Globals take up a bit more memory than parameters (255 bytes), but are a little easier to work with. When you exit the form, be sure to erase the global (Erase('global.where_clause');) to release its memory. Also, from your code above, it looks like you have data from two different tables. If you want the where clause to be dependent on data from both tables, you will need to create a view first, and then base the block on the view. Received on Mon Oct 07 1996 - 00:00:00 CEST

Original text of this message