using different database (SID) in a subselect with SQL*Plus / Shell Scripts
From: Sven Aluoor <aluoor_at_gmail.com>
Date: Wed, 23 Nov 2011 16:37:51 +0100
Message-ID: <CANqyDm1b7wDf17THq18zhHrL1b84CYckreRtjjaV_=vZamEjdw_at_mail.gmail.com>
Hi
Date: Wed, 23 Nov 2011 16:37:51 +0100
Message-ID: <CANqyDm1b7wDf17THq18zhHrL1b84CYckreRtjjaV_=vZamEjdw_at_mail.gmail.com>
Hi
I have this simplified SQL statement within Shell Script.
function ()
{
sqlplus -S $DBO/$DBOPW_at_$ORACLE_SID <<EOF >
/opt/test/output.$(/bin/date '+%d%m%Y.%Hh')
set echo Off
[...]
set linesize 20000
SELECT testfield from test where testfield not in (select testfield from test2);
exit
EOF
}
The problem is that the subselect (select testfield from test2) is an other oracle database (not the one connected on with sqlplus). Howto to that with SQL*Plus and Shell Scripts?
cheers Sven
-- http://www.freelists.org/webpage/oracle-lReceived on Wed Nov 23 2011 - 09:37:51 CST