Calling .ksh from Oracle 8i pl/sql bolck [message #516937] |
Thu, 21 July 2011 08:18 |
|
msol25
Messages: 396 Registered: June 2011
|
Senior Member |
|
|
hi Experts,
I am trying to call pl/sql anonymous block from .ksh script i.e.
sqlplus -s abc/abc << end_of_sql 2> /dev/null
begin
insert into ss1 values('10');
commit;
end;
end_of_sql
ss1 table structure is :
create table ss1(sno varchar2(20));
Please help me,its urgent;
|
|
|
|
|
|
Re: Calling .ksh from Oracle 8i pl/sql bolck [message #516947 is a reply to message #516944] |
Thu, 21 July 2011 08:27 |
cookiemonster
Messages: 13943 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
Also it'd be an idea to use an apropriate title. You've copied one from one of your previous threads (I almost merged this into it), but the title describes the exact opposite of what you are currently trying to do.
It also talks about 8i, but the version info you have supplied for this thread stats 10g.
So which version are you actually using?
|
|
|
|
|
|
Re: Calling .ksh from Oracle 8i pl/sql bolck [message #516953 is a reply to message #516949] |
Thu, 21 July 2011 08:36 |
cookiemonster
Messages: 13943 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
msol25 wrote on Thu, 21 July 2011 14:28I m able to call :
sqlplus -s pirm_owner/pirm_owner << end_of_sql 2> /dev/null
insert into ss1 values(10);
commit;
end_of_sql
But i think,i am doing mistake for calling pl/sql block.
Actually my requirement is to call one row one column table value into unix variable.
Please help me.
So your intial post has nothing to do with your actual problem since really you need a select?
Words fail me.
VARIABLE=`sqlplus -s username/pass <<EOF
set pagesize 0
select to_char(SYSDATE, 'YYYYMMDDHH24MISS') from dual;
exit;
EOF`
|
|
|
|
|
|
|