isql output

Posted on 2006-06-29
Medium Priority
Last Modified: 2012-08-14
'lo perts.

Is it possible to send the output from a isql query to a variable in a shell script?


isql -b -Usa -P******<<-EOF > $variable
use prod_talis
select sum(AMOUNT) from CHARGE_INCURRED where BORROWER_ID = 0158258

echo $variable

I'm fairly new to shell scripting and if I were to do this,it would be brilliant.

I look forward to your replies!

Question by:killroy03
LVL 29

Accepted Solution

MikeOM_DBA earned 200 total points
ID: 17010279

Try this:

isql -b -Usa -P******<<-EOF
use prod_talis
select sum(AMOUNT) from CHARGE_INCURRED where BORROWER_ID = 0158258
echo $variable

PS: Those are back-ticks.

Author Comment

ID: 17010350
How very odd, I did try the back ticks approach but it didn't work.

I got the idea from


Oh well...I must've been making typos.

Thanks for the help Mike.

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
How to fix display issue, screen flickering issue when I plug in power cord to the machine. Before I start explaining the solution lets check out once the issue how it looks like after I connect the power cord. most of you also have faced this…
When you have multiple client accounts to manage, it often feels like there aren’t enough hours in the day. With too many applications to juggle, you can’t focus on your clients, much less your growing to-do list. But that doesn’t have to be the cas…

619 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question