![]() |
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | 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 and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Connecting to oracle database from shell script | satyakiran | Shell Programming and Scripting | 8 | 07-03-2009 04:22 PM |
| sybase connection through shell-script | Amitabh | UNIX for Dummies Questions & Answers | 9 | 04-10-2009 11:34 PM |
| error connecting sql through a shell script | nehak | Shell Programming and Scripting | 1 | 04-30-2008 09:04 AM |
| Connect to sybase database using Korn shell script | bhgopi | Shell Programming and Scripting | 7 | 08-10-2005 10:34 AM |
| Connecting DB in the Shell Script to do SQL Query | mehuldoshi | UNIX for Advanced & Expert Users | 3 | 03-29-2003 12:47 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | 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 11:29 AM.. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|