dbTalk Databases Forums  

Runtime Variables in Sybase

comp.databases.sybase comp.databases.sybase


Discuss Runtime Variables in Sybase in the comp.databases.sybase forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Nitin Bansal
 
Posts: n/a

Default Runtime Variables in Sybase - 09-10-2004 , 04:11 AM






Hi All,

Is there some way in which we can get values for a variable at runtime
from the user in sybase?
Something of the sort what '&' does in oracle.

Nitin

Reply With Quote
  #2  
Old   
Rob Verschoor
 
Posts: n/a

Default Re: Runtime Variables in Sybase - 09-10-2004 , 05:18 AM






"Nitin Bansal" <nitin.bansal (AT) gmail (DOT) com> wrote

Quote:
Hi All,

Is there some way in which we can get values for a variable at runtime
from the user in sybase?
Something of the sort what '&' does in oracle.

Nitin
select @variable_name


HTH,

Rob
-------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase Replication Server Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"

mailto:rob (AT) YOUR (DOT) SPAM.sypron.nl.NOT.FOR.ME
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------




Reply With Quote
  #3  
Old   
Brian Ceccarelli
 
Posts: n/a

Default Re: Runtime Variables in Sybase - 09-15-2004 , 09:15 AM



No. isql does not have the ability to query the user at run-time. There
is no equivalent to Oracle's &.

You have two options:

1. You can turn your isql batch into a stored procedure and then call
the stored procedure.

2. You can use keywords in your SQL and use a program like
DBPowerSuite's psSQL to replace keyword values as the program executes.

Brian
http://www.dbpowersuite.com




"Nitin Bansal" <nitin.bansal (AT) gmail (DOT) com> wrote

Quote:
Hi All,

Is there some way in which we can get values for a variable at runtime
from the user in sybase?
Something of the sort what '&' does in oracle.

Nitin



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.