Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: putting parameters in one parameter....help!!

Re: putting parameters in one parameter....help!!

From: TurkBear <johng_at_nospam.mm.com>
Date: Thu, 29 Apr 1999 14:51:23 GMT
Message-ID: <37297066.3735962@news.dot.state.mn.us>


"deb" <dnanda_at_netcom.ca> wrote:

>hi ,
>i have a problem ...i have a procedure which takes variable number of
>parameters and now the problem is that i need to put these incoming
>parameters into one variable. This one variable is then to be passed to a
>procedure which will then parse these parameters one by one... and break
>them up again to get the orginal set of inputs...i hope i am clear...here is
>my code
>
>

---------------------skipped----------------------------------------

>par_value_list :='session_id='||argv(1)||';page_id='||argv(2)||; so on
>==================================================

>
>An example would be: 2 variables being passed with the following values -
>argv(1)=10 and argv(2)=20, then the desired result is one text string
>containing--> 'session_id=10;page_id=20'
>

Its not clear from your posting how the 'one variable' will get the multiple values, but if they are concatenated from some 'source' set of values, then you could use a separator between them to allow for easy parsing....for instance:

If you are getting val1, val2 and val3 and concatenating then into param ( so param := val1||val2||val3 ), instead do param := 'Val1'||val1|'Val2||val2||'Val3'||val3.....Then have the procedure check for, say, 'Val3' in the passed parameter - this indicates 3 values have been concatenated - using combinations of substr(), and instr() you should be able to parse out the needed info....

Not very elegant, but should work.....

To reply by Email please remove the 'nospam' part of the address Received on Thu Apr 29 1999 - 09:51:23 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US