The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
comands inside the script mercuryshipzz Security 4 02-13-2008 12:25 PM
How to run an SQL script inside a shell stevefox Shell Programming and Scripting 1 06-15-2006 07:11 PM
how to find Script file location inside script asami Shell Programming and Scripting 10 03-14-2006 08:57 PM
rsh script with inside a for loop trekianov Shell Programming and Scripting 4 01-20-2006 05:54 AM
Using tar inside a shell script kas7225 Shell Programming and Scripting 2 05-19-2005 08:06 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 02-03-2006
Registered User
 

Join Date: Aug 2005
Posts: 39
Stumble this Post!
sql inside a script

Hi,

In a KSH script i have to run a sybase query and get the count into a unix variable.

How can i do that?

Your help is much appriciated.

Thanks,
sateesh
Reply With Quote
Forum Sponsor
  #2 (permalink)  
Old 02-03-2006
Registered User
 

Join Date: Feb 2006
Location: Mumbai, India
Posts: 24
Stumble this Post!
In ksh connect to sybase (it might differ with the version you use) generically it should be :

isql -U<LOGIN> -P<PASSWD> -S<SERVER> -w2000 << EOF > <LOGFILE>

----Your queries come here ------

EOF

The above format will let you execute the query in ksh script. Of coure if isql is not in your PATH you will have to give the whole PATH rather than just isql

Let me know if you need more help
Reply With Quote
  #3 (permalink)  
Old 02-03-2006
Registered User
 

Join Date: Aug 2005
Posts: 39
Stumble this Post!
Thanks for the reply,

But i want to run that command and take count assigned to a variable.

How can i do that
Reply With Quote
  #4 (permalink)  
Old 02-03-2006
Registered User
 

Join Date: Jan 2005
Posts: 682
Stumble this Post!
Check this post.
Reply With Quote
  #5 (permalink)  
Old 04-26-2006
Registered User
 

Join Date: Apr 2006
Posts: 3
Stumble this Post!
Hi can you tell me if there is a sybase sql client (iSQL) that works with SCO6 and if so where can I download it from?
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 11:58 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0