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 and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
isql output d_swapneel14 Shell Programming and Scripting 6 3 Weeks Ago 07:31 AM
Converting Binary decimal coded values to Ascii Values gaur.deepti UNIX for Advanced & Expert Users 3 04-02-2008 01:33 PM
isql query in unix shell script jaydeep_sadaria Shell Programming and Scripting 3 11-14-2007 03:07 AM
regarding isql girish_shukla UNIX for Dummies Questions & Answers 2 10-21-2003 08:15 AM
isql eloquent99 UNIX for Dummies Questions & Answers 2 02-10-2003 02:05 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-24-2005
DebianJ DebianJ is offline
Registered User
  
 

Join Date: May 2005
Posts: 52
get values from isql query

hi all

i have an isql sentence in a ksh script, what get some values from my database (Sybase IQ 12.5 - solaris 5.7)

how can i read this sql results??? do i have to do a while?? a for???
where do i put the values??

my idea is put them in an array, is that possible?


please, help me
any idea, thanks

jona
  #2 (permalink)  
Old 05-24-2005
zazzybob's Avatar
zazzybob zazzybob is offline Forum Advisor  
Registered Geek
  
 

Join Date: Dec 2003
Location: Melbourne, Australia
Posts: 2,100
Something to get you started...
Code:
$ more testisql.ksh
#!/bin/ksh

results=`isql -Usa -Pmy_sa_password_goes_here <<EOF
select name from sysobjects where type = "U"
go
EOF`

line_count=0
echo "${results}" | while read line; do
   echo "Line $((line_count = line_count + 1)) is ${line}"
done

exit 0
$ ./testisql.ksh
Line 1 is name
Line 2 is ------------------------------
Line 3 is spt_values
Line 4 is spt_monitor
Line 5 is spt_limit_types
Line 6 is syblicenseslog
Line 7 is spt_ijdbc_table_types
Line 8 is spt_ijdbc_mda
Line 9 is spt_ijdbc_conversion
Line 10 is ijdbc_function_escapes
Line 11 is spt_jdbc_table_types
Line 12 is spt_mda
Line 13 is spt_jtext
Line 14 is spt_jdbc_conversion
Line 15 is jdbc_function_escapes
Line 16 is 
Line 17 is (13 rows affected)
Cheers
ZB
  #3 (permalink)  
Old 04-26-2006
rdhavale rdhavale is offline
Registered User
  
 

Join Date: Apr 2006
Posts: 3
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?
  #4 (permalink)  
Old 06-27-2008
surenz298 surenz298 is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 4
I need help badly

Hi

I am getting leading spaces when i excecute a query in ISQL,is there any option to remove that while in ISQL itself


|LU0001749554|Luxembourg Stock Exchange|Luxembourg Stock Exchange|4081045||D03363767802
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:29 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0