using different database (SID) in a subselect with SQL*Plus / Shell Scripts

  • From: Sven Aluoor <aluoor@xxxxxxxxx>
  • To: oracle-l@xxxxxxxxxxxxx
  • Date: Wed, 23 Nov 2011 16:37:51 +0100

Hi

I have this simplified SQL statement within Shell Script.

function ()
{
sqlplus -S $DBO/$DBOPW@$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
--
//www.freelists.org/webpage/oracle-l


Other related posts: