![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connecting to oracle database from shell script | satyakiran | Shell Programming and Scripting | 5 | 07-16-2008 08:05 AM |
| sybase connection through shell-script | Amitabh | UNIX for Dummies Questions & Answers | 7 | 06-19-2008 06:55 PM |
| error connecting sql through a shell script | nehak | Shell Programming and Scripting | 1 | 04-30-2008 05:04 AM |
| Connect to sybase database using Korn shell script | bhgopi | Shell Programming and Scripting | 7 | 08-10-2005 06:34 AM |
| Connecting DB in the Shell Script to do SQL Query | mehuldoshi | UNIX for Advanced & Expert Users | 3 | 03-29-2003 08:47 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
|||
|
Connecting to sybase via shell script.
Hi All,
I was able to connect to sybase in shell script and also able to run few sql queries, something like this, #!/usr/bin/ksh -x temp=`echo "select name from sysobjects where type = 'U'"` results=`isql -SDS_SERVER-UAdhocUser -Pha12 <<EOF set rowcount 6 $temp go EOF` line_count=0 echo "${results}" | while read line; do echo "Line $((line_count = line_count + 1)) is ${line}" done But if suppose sql queries are stored in file called "sql_query.txt", then how should it be executed. (Above code is taken from this forum only Thanks in advance for help. Last edited by arvindcgi; 05-20-2008 at 07:29 AM. |
| Forum Sponsor | ||
|
|