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 -> pl/sql variables

pl/sql variables

From: tony <ttigger4321_at_hotmail.com>
Date: Thu, 06 Jun 2002 15:25:51 GMT
Message-ID: <3cff7bdd.271435646@news.dal.ca>


I would like to learn more about variables in pl/sql.

What I am tryng to do is write dynamic sql like this:

'select part_no, part_desc from parts
order by ' || v_orderby || ' ' || v_asc_desc;

I would like to be able to do something like:

IF v_orderby = part_no AND v_asc_desc = asc THEN

   v_asc_desc = desc
END IF Every time I call the procedure the variables get initialized. How can I store their previous values in memory?

thanks

cheers,
tony
902.494.1021 w
902.461.4550 h Received on Thu Jun 06 2002 - 10:25:51 CDT

Original text of this message

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