Re: Report question- INSTR built-in

From: Aleksandr Kononov <AKononov_at_pptk.energo.ru>
Date: Tue, 29 Aug 2000 08:00:55 GMT
Message-ID: <8ofqjf$gr9$1_at_nnrp1.deja.com>


I would edit this trigger

function AfterPForm return boolean is

  v_quote constant varchar2(1) := chr(39); -- v_wild_card boolean;

begin
  if InStr( :p_jon_list, '%', 1 ) > 0 then -- ===========

    :p_jon_list := 'Where job_order_primary.jon like ('

                   || v_quote || :p_jon_list || v_quote
                   || ')';

  else
    :p_jon_list := 'Where job_order_primary.jon in ('
                   || v_quote || :p_jon_list || v_quote
                   || ')';

  end if;
  return (TRUE);

end AfterPForm;

Regards,
Aleksandr Kononov

In article <8oemhk$7qg$1_at_nnrp1.deja.com>,   perkinsdt_at_my-deja.com wrote:
> I am trying to check to see if a passed in parameter has a wildcard
> embedded in it and them creating my where clause accordingly. The
> following is my function, the instr part does not seem to be working.
> It compiles, however, no matter what I put in :p_jon_list it is
 calling
> the LIKE part not the else part.
>
> function AfterPForm return boolean is
> v_quote varchar2(1) := chr(39);
> --v_wild_card boolean;
> begin
> IF INSTR(':p_jon_list','%',1)>0 then
> :p_jon_list := 'Where job_order_primary.jon
> LIKE('||v_quote||:p_jon_list||v_quote||')';
> else
> :p_jon_list := 'Where job_order_primary.jon IN
> ('||v_quote||:p_jon_list||v_quote||')';
>
> end if;
> return (TRUE);
>
> Diane
> perkinsdt_at_navair.navy.mil
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.
>

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Tue Aug 29 2000 - 10:00:55 CEST

Original text of this message