Re: using a variable as a "macro"

From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 16 Dec 2005 15:09:54 -0700
Message-ID: <43a34942$1_at_news.victoria.tc.ca>


HansF (News.Hans_at_telus.net) wrote:
[Quoted] : On Fri, 16 Dec 2005 07:34:21 -0800, cumin wrote:

: > Is there a way to access an environmental variable in sqlplus? A lot of
: > the ad hoc queries I run have the phrase
: >
: > and tty in ('IN','BN','SCD','SBD','SCDF','SBDF','SCDC','SBDC')
: >
: > and I am too lazy to type that in so much. Is there a way to set and
: > retrieve a string variable in sqlplus that will let mr put this string
: > into numerous queries? I'd like the vairable to live in the databse,
: > but if it needs to be an OS environent variable that's ok too.
: >
: > Thanks

: How about looking up 'substitution variables' in the docco. Or are you : too lazy for that as well?

Also, by example

	select * from table
	where
	_at_mycriteria
	;


uses the file mycriteria.sql Received on Fri Dec 16 2005 - 23:09:54 CET

Original text of this message