Home » RDBMS Server » Server Utilities » Problem on SQL
Problem on SQL [message #70873] Fri, 02 August 2002 21:16 Go to next message
Laxman Chepuri
Messages: 8
Registered: May 2002
Junior Member
I am defined a variable and accepted a value
How Can I use that variable in Queries.

For Ex:
SQL>define a
SQL>accept a
10
SQL>define a
DEFINE A = "10" (CHAR)
SQL>
I want to use the value of 'a' in my Sql Queries.
How Can I Write?

Thanks (Adv)
Re: Problem on SQL [message #70927 is a reply to message #70873] Thu, 15 August 2002 01:52 Go to previous message
Dileep Dharma
Messages: 6
Registered: August 2002
Junior Member
If col = number field:
Select * from table where col = &a ;

if col = varchar2 field:
Select * from table where col = '&a' ;

Dileep Dharma
Previous Topic: SQL Loader
Next Topic: SQL*Loader - how to exit back to calling batch file
Goto Forum:
  


Current Time: Mon Apr 29 14:04:29 CDT 2024