Results 1 to 3 of 3
  1. #1
    Join Date
    Aug 2004
    Location
    Rome, Italy
    Posts
    81

    Unanswered: How to pass a DB ORACLE value to a variable of OS(unix)

    Hi guys,
    I have a problem. Actually I must receive the value of a variable(UNIX) from a table. How can I do it? More simply:
    I have the table which has the value 200403 in default DB of the system. How can I pass this value to a local variable in unix script?

    Thanks in advance,
    ducasio

  2. #2
    Join Date
    Feb 2004
    Posts
    37
    Code:

    VAR=`$ORACLE_HOME/bin/sqlplus -s un/pwd@db <<EOF
    whenever sqlerror exit 1
    set escape off
    set head off
    set verify off
    select to_char(SYSDATE,'YYYY-MM-DD') from dual;
    EOF
    `
    Last edited by gomes009; 02-16-05 at 11:52.

  3. #3
    Join Date
    Aug 2004
    Location
    Rome, Italy
    Posts
    81
    great, it works,
    thanks a lot.

    ducasio

Posting Permissions

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