Home » RDBMS Server » Server Administration » updating a variable with a field value
updating a variable with a field value [message #372808] Sat, 10 March 2001 08:11 Go to next message
ron
Messages: 50
Registered: July 1999
Member
I know this has got to be simple but I just can't find the right command.

In the select statement:

select T$argu
from Table
where T$argu
Like 'xyz%'

I want the output of that to be a variable that I can use else where.

TIA Ron
Re: updating a variable with a field value [message #372824 is a reply to message #372808] Mon, 12 March 2001 08:11 Go to previous message
Bala
Messages: 205
Registered: November 1999
Senior Member
Hi,

In SQL-PLUS you can use the new_val command to keep the value in a variable for that particular session.

SQL> column T$argu new_val argu;

SQL> select T$argu from Table where T$argu
Like 'xyz%';

now you can use &argu to get the variable.....
like.........
SQL> insert into t1 values(&argu, ......

Bala.
Previous Topic: FASTER QUERY
Next Topic: Aggregate and Subquery in Select Clause
Goto Forum:
  


Current Time: Mon Jun 17 01:11:52 CDT 2024