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

Home -> Community -> Usenet -> c.d.o.misc -> Re: Getting the first value out of a string.

Re: Getting the first value out of a string.

From: Murali <oraclems_at_hotmail.com>
Date: 8 Mar 2002 10:42:15 -0800
Message-ID: <22e6597b.0203081042.795f79a7@posting.google.com>


>
> htp.FormOpen ('sartest.show_maintequip');
> htp.FormSelectOpen('maint_location',' Select a Location from list: ');
> FOR loc IN maintequip_list
> LOOP
> /*
> Passes both values of loc.location and loc.description to
> sartest.show_maintequip procedure as ONE value
> */
> htp.FormSelectOption (loc.location||' ->
> '||loc.description,cattributes=>'maint_location="'||loc.location||'"');
> END LOOP;
> htp.FormSelectClose;
>
> The show_maintequip procedure is
> PROCEDURE show_maintequip (maint_location in VARCHAR2)
>
> The value that get's passed for example is
> RC2262 -> Depot 1
> SARB-DROPPED -> Depot 2.
>
> I would only like to pass the first value.
>

Hi,

If you havent figured it out already, try this -

htp.formSelectOption
(loc.location||'->'||loc.description,cattributes=>'VALUE="'||loc.location||'"');

The VALUE keyword will assign the location to the variable maint_location. This should work and only one value should get passed to your show_maintequip procedure.

Murali
http://www.dbaquest.com/ Received on Fri Mar 08 2002 - 12:42:15 CST

Original text of this message

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