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: assigning variable in SQL*Plus

Re: assigning variable in SQL*Plus

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Sat, 03 Apr 1999 23:26:01 GMT
Message-ID: <371a9a2e.5698583@netnews.worldnet.att.net>


On Thu, 01 Apr 1999 21:15:04 GMT, andyho99_at_my-dejanews.com wrote:

>I was wondering whether we can assign a value to a variable from sql
>statement in SQL*Plus.

Do you mean assign a value to a substitution variable? Yes, there is a trick for that. Try the following:

column todays_date new_value todays_date_var select sysdate todays_date from dual;
select '&&todays_date_var' from dual; (or try define)

My book, SQL*Plus, the Definitive Guide, talks about this in more detail.

regards,

Jonathan Received on Sat Apr 03 1999 - 17:26:01 CST

Original text of this message

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