Re: 'Dynamic IN'-statement in Forms 4.5

From: Mike J Cox <mike_at_kane.demon.co.uk>
Date: 1995/06/26
Message-ID: <298165673wnr_at_kane.demon.co.uk>#1/1


> WHERE to_char(<column_name>) in (<global.variable>)
>
> I have to use the 'to_char' conversion function because I have to define the global variable as a character-string.
> However if I do this, Oracle Forms puts the entire variable (and thus the entire comma-separated list) between single-
> quotes and my query returns no rows.
> Does anyone know a way to solve this problem ??? I've tried to put the values in the list in quotes, but then forms
 doubles
> the number of quotes, so that doesn't work either.
>

If you are using 4.5 I think you can mess around with the block properties and alter the default where clause, ive not used it yet but I know it is there, probably set_block_property.

Alternatively in the old days we would instr(:global...,to_char(col)) > 0 or maybe the other way around, basically does the col exist in the value of the global, best to separate out the individual elements of the global with a separator unless the col is single character so if the values are bert,fred and joe then you should have bert/fred/jo rather then bertfredjo otherwise you would get a match on rtfre ... !!!

Sorry to waffle, hope it makes sense.

Mike

-- 
******************************************************************************
Michael Cox          Input Technolgies Ltd
Email                mike_at_kane.demon.co.uk
Compuserve           100045.1715_at_compuserve.com
******************************************************************************
Received on Mon Jun 26 1995 - 00:00:00 CEST

Original text of this message