Results 1 to 2 of 2
  1. #1
    Join Date
    Dec 2003
    Location
    Karachi, Pakistan
    Posts
    45

    Unanswered: Pass Value from OS in SQL

    Did i pass a value into Variable inside my SQL script through OS(Unix).
    for example

    my_sql.sql
    ------

    select Tname from tab
    where tname =&Table_Name

    So who i pass a value into table_name from OS command prompt

    $> sqlplus scott/tiger @table_name

  2. #2
    Join Date
    Jun 2003
    Location
    West Palm Beach, FL
    Posts
    2,713

    Talking

    Do this:


    $> sqlplus scott/tiger @my_sql Table_Name

    and my_sql.sql
    ------

    select Tname from tab
    where tname =&1
    The person who says it can't be done should not interrupt the person doing it. -- Chinese proverb

Posting Permissions

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