10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I am trying to run a query which returns a sum value(a number).
I want to get it in a variable so that i can refer to that variable in different places.
when i am running the following command
variable=`isql -Uuser -Sserver -Ppassword
1> select sum(count(*)) from xyz..abc where clm_id... (2 Replies)
Discussion started by: Sharma331
2 Replies
2. Shell Programming and Scripting
Hello,
I have a shell script where I am doing an isql to select some records. the result i get from the select statement is directed to an output file. I want to assign the result to a Shell variable so that I can use the retrieved in another routine.
e.g.
"isql -U${USER} -P${PASSWD} -S${SERVER}... (1 Reply)
Discussion started by: RookieDev
1 Replies
3. Shell Programming and Scripting
I want output to be assigned to UNIX variables
echo "Enter RRS ID: "
read rrs
isql -SPROD_DDS -USYBUSER -PSYBPASS -b -osfg.out << EOF
use sip
go
set nocount on
select issuerId,
legalStructTxt,
productName,
issuerName
from sf_product
where rrsId = $rrs
go
EOF (1 Reply)
Discussion started by: JayDoshi
1 Replies
4. UNIX for Dummies Questions & Answers
Hi ,
I want to use shell variable in isql.
example..
$ksh ./sudh.ksh "2041qwer"
sudh.ksh is my script passing the perameter "2041qwer"
Code in my script :
===========
$SYBASE/$SYBASE_OCS/bin/isql -I$SYBASE/interfaces -S$OTHRSRVR -U$SYBUSER -P$SYBPASS -w... (1 Reply)
Discussion started by: sudhakarpasala
1 Replies
5. Shell Programming and Scripting
Hello,
I am writing a ksh script on an AIX system. I need to get the date and time from a file into a variable. I found the following perl script from another post on this site and modified it slightly to output the format I need:
perl -e '@d=localtime ((stat(shift)));... (4 Replies)
Discussion started by: swimp
4 Replies
6. Shell Programming and Scripting
Hi All-
First time using iSql.
I have 4 query files - some have more than 1 line of sql statements
After a bit of research it appears I can just use the -i command and specify the input file.
Questions:
Does it matter that there are multiple queries in each file? Do I need to have... (3 Replies)
Discussion started by: Cailet
3 Replies
7. Shell Programming and Scripting
What I am trying to do is check if the database query returned any records.
If no records returned then output a message else output results to a file.
Right now if I take out the if and else statements the code runs fine and sends the email. If no records returned the email sends the column... (4 Replies)
Discussion started by: johnu122
4 Replies
8. Shell Programming and Scripting
Hi Guys,
Need help. I am using ISQL inside a shell script.
Is there a way to set the value of shell script variable from inside the ISQL code. I do not want to write the results from the SQL to an output file.
Please let me know.
Regards,
Tipsy. (3 Replies)
Discussion started by: tipsy
3 Replies
9. Shell Programming and Scripting
Hi Guys !
I am new to unix and want to find out how we can make sql statement data to shell script variable?
Any help/suggestion is greatly appreciated
-Chandra (1 Reply)
Discussion started by: kattics
1 Replies
10. UNIX for Dummies Questions & Answers
Hi,
I am giving a grep command, and i am getting the output. i want to store it in a variable
for eg
a = grep '12345' /dir/1/2/log.txt ( the output is number)
b= grep 'basic' /dir/1/2/log1.txt (in this case the output is character)
so how to assign the output of grep to a variable
... (1 Reply)
Discussion started by: vasikaran
1 Replies