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: owa_util.listprint question

Re: owa_util.listprint question

From: AleX <korrozia_at_my-deja.com>
Date: Mon, 28 Jun 1999 23:54:29 GMT
Message-ID: <7l91vg$a5$1@nnrp1.deja.com>


Thank you Thomas!

This surely resolved the issue.

In article <3784dc4d.29156254_at_newshost.us.oracle.com>,   tkyte_at_us.oracle.com wrote:
> A copy of this was sent to AleX <korrozia_at_my-deja.com>
> (if that email address didn't require changing)
> On Mon, 28 Jun 1999 20:04:42 GMT, you wrote:
>
> > Hi!
> >
> >
> >I have a simple pl/sql question.
> >
> >I'm trying to create a select drop-down list for a pl/sql query.
> >My code looks like this:
> >
> >procedure session_selector
> > is
> > p_query varchar2(100);
> > v_cursorID integer;
> > begin
> > htp.bodyopen;
> > htp.formOpen ('presentation_builder.get_session_data');
> > p_query:='SELECT session_id FROM SESSION_LIST_TABLE';
> > v_cursorID:=owa_util.bind_variables (p_query);
> > owa_util.listprint (v_cursorID, 'p_value',10);
> > htp.para;
> > htp.formSubmit;
> > htp.formclose;
> > htp.bodyclose;
> > end session_selector;
> >
> >=======
> >
> >I get 'variable not in select list' when I run this procedure.
However,
> > owa_util.cellsprint works just fine with the same cursor. I'm on
8.0.5
> >on NT. Please help!
>
> You must use a query that returns 3 columns:
>
> --
> -- Create a multi select list, a drop down list or a single select
list.
> -- You send it a query that selects out in ORDER:
> -- COLUMN 1 - What your procedure will get back
> -- COLUMN 2 - What your user will see in the list box
> -- COLUMN 3 - a null or non-null field. If the field is non-null,
> -- the current row will be flagged as SELECTED in the list
box
> --
>
> So, at a minimum you can try:
>
> p_query:='SELECT session_id, session_id, NULL FROM
SESSION_LIST_TABLE';
>
> that will show to the user the same thing your procedure gets back and
have none
> of them selected by default. Another example might be:
>
> select user_id, username, decode(username,'SYS',1,NULL) from all_users
>
> that would create a list that returns to your procedure the USER_ID
but lets the
> end user pick from a list of USERNAMES and has the SYS user selected
by default.
>
> --
> See http://govt.us.oracle.com/~tkyte/ for my columns 'Digging-in to
Oracle8i'...
> Current article is "Part I of V, Autonomous Transactions" updated June
21'st
>
> Thomas Kyte tkyte_at_us.oracle.com
> Oracle Service Industries Reston, VA USA
>
> Opinions are mine and do not necessarily reflect those of Oracle
Corporation
>

--

                 Alex Shterenberg

"I hate people. I think they should suffer as much as  possible, and therefore I'm into those old communist

         dictatorships." - Euronymous, Mayhem

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Mon Jun 28 1999 - 18:54:29 CDT

Original text of this message

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