Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Escape character for period '.' with SQLPLUS and shell script ?

187 views
Skip to first unread message

zw

unread,
Feb 3, 2008, 2:02:08 AM2/3/08
to
Hi

I have the following:

The 9th variable is TEST

shell script A.sh
------------------------
B.sh $1 $2 $3 $4 $5 $6 $7 $8 $9


shell script B.sh
-----------------------
C.sh $tmp $locate $5 $7 $3 $4 $9 &

shell script C.sh
------------------------
sqlplus -s $5/$6@$7 @no_session.sql $3 >> $fc1

no_session.sql
----------------------
select count(*) Q2_STATUSLOG from &1.Q2_STATUSLOG;


When I tail file fc1, I saw this:

old 1: select count(*) Q2_STATUSLOG from &1.Q2_STATUSLOG
new 1: select count(*) Q2_STATUSLOG from TESTQ2_STATUSLOG
select count(*) Q2_STATUSLOG from TESTQ2_STATUSLOG
*
ERROR at line 1:
ORA-00942: table or view does not exist

I was expecting SQLPLUS to correctly find the table TEST.Q2_STATUSLOG
when replacing &1 with TEST but somehow the '.' is missing.
Is there a workaround to make sure the '.' is there ?
Is there a way to make an escape for '.'.
I cannot change TEST to TEST. to pass as argument, only TEST


Thanks

csn

unread,
Feb 3, 2008, 3:42:33 AM2/3/08
to
Use double dots.

select count(*) Q2_STATUSLOG from &1..Q2_STATUSLOG;

0 new messages