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

Home -> Community -> Usenet -> c.d.o.tools -> Re: SQL PLUS question

Re: SQL PLUS question

From: Kiloran <kiloran_at_scotland.com>
Date: Tue, 27 Feb 2001 08:27:17 -0000
Message-ID: <97fodk$h28$1@newshost.mot.com>

Is this the kind of thing you want?.....

column my_par new_value my_par

select field1 my_par
from table1
where field2 = 'abcde';

select field1
from table2
where field2 = '&my_par';

--
--
Regards,
Kiloran

jAnO! <j.j.groot_at_kpn.com> wrote in message
news:01c0a08f$c264d750$142b15ac_at_TONTW0102131521...

>
> Brian Tkatch <SPAMBLOCK.Maxwell_Smart_at_ThePentagon.com.SPAMBLOCK> schreef
in
> artikel <3a9a88cf.266100765_at_news.alt.net>...
> > You can declare a variable in SQLPLUS with the variable command. The
> > PRINT command will show you what the variable equals.
> >
> > VARIABLE MyVar VARCHAR2
> > PRINT MyVar
> >
> > And do not use ERROR as a variable. It won't work. I found out the
> > hard way. :-(
>
> Thank you, but i want to know how to fill that parameter with the result
of
> a query....
>
>
>
> > It is all explained in the "SQL*Plus User's Guide and Reference",
> > Chapter 3, Subtitle, "Using Bind Variables".
> >
>
> I can't acces the WWW from here so i can't look it up.....
>
> > HTH,
> > Brian
> >
>
Received on Tue Feb 27 2001 - 02:27:17 CST

Original text of this message

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