arguments in isql session

Posted on 1999-07-19
Medium Priority
Last Modified: 2011-10-03
I'm setting up a script for isql but I need to pass an argument also:
isql -Uuser -Ppassword < myscript <commandlineargument>
How do I reference this command line argument in my script - $1 or something?
Question by:robjay
  • 2

Accepted Solution

jordan1 earned 200 total points
ID: 1098924
Hi robjay!

       isql would not take arguments like that.

       You can set your variables in the script itself
and then call isql and use the variables inside it.

Example script:
#! /usr/bin/ksh
NAME="John Doe"
isql -Urobjay -SSERVER<<-EOF
   select * from ${TABLENAME}
   where name = "${NAME}"

   If this is not what you are looking for, let me know.


Author Comment

ID: 1098925
Yes, this works for me. Thanks.

Author Comment

ID: 1098926
Is there any way to get an argument FROM the isql session to the shell?

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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

Healthcare has made massive developments over the past decade, thanks largely to technological advancement. Yet despite that these advancements are saving our lives, few truly understand how much healthcare has changed, and where it is headed.
In this article the author has highlighted some of the best features of best data recovery brands that are going to rock in 2018 (in the author's humble opinion).
In response to a need for security and privacy, and to continue fostering an environment members can turn to for support, solutions, and education, Experts Exchange has created anonymous question capabilities. This new feature is available to our Pr…
The video will let you know the exact process to import OST/PST files to the cloud based Office 365 mailboxes. Using Kernel Import PST to Office 365 tool, one can quickly import numerous OST/PST files to Office 365. Besides this, the tool also comes…

624 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