Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2006
    Posts
    1

    Unanswered: sqlplus thru shellscript??

    how do i execute sql queries thru shell scripts???

  2. #2
    Join Date
    Mar 2006
    Posts
    25

    Unhappy

    u can execute queries in sybase thru shell scripts as

    open one file using vi editor as
    vi filename
    isql -Uuser_name -Ppassword -Sserver_name
    sqlstatement.........
    go
    ....................
    go

    save these statements in ur file

    and then execute as

    sh filename.sh

    Quote Originally Posted by abhinavTCS
    how do i execute sql queries thru shell scripts???
    Last edited by prashant_add; 04-04-06 at 07:48.

  3. #3
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Something like this
    Code:
    #!/bin/ksh
    id=$1
    sqlplus -s user/passwd@remoteserver <<EOF
    select * from client where id=$id;
    EOF
    Last edited by pdreyer; 04-04-06 at 08:05.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •