How can I pass parameters to an "SQL Script" from isql
2
votes
3
answers
20384
views
I am wondering if it is possible to pass parameters to an SQL script from within sybase's isql utility.
For example, I'd like to store a select statement in the file
the_script.sql
that would look something like
select
col_1,
col_2,
etc
from
table
where
cond1 > $param1 and
cond2 < $param2
Then, with that file, I'd like to "execute" it from isql with
:r the_script.sql 900 20
with the expectation that $param1
is repleaced with 900 and $param2
with 20.
Is there a possibility to achieve what I want?
Asked by René Nyffenegger
(3763 rep)
May 25, 2011, 08:03 AM
Last activity: Apr 20, 2013, 05:24 AM
Last activity: Apr 20, 2013, 05:24 AM