![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unix Arithmatic operation issue , datatype issue | thambi | Shell Programming and Scripting | 23 | 02-19-2008 04:19 AM |
| awk and execute app | tyger52 | Shell Programming and Scripting | 0 | 12-06-2007 06:43 PM |
| execute | bkan77 | Shell Programming and Scripting | 3 | 07-20-2007 10:42 AM |
| script execute or no execute | Kespinoza97 | Shell Programming and Scripting | 4 | 06-23-2007 06:27 AM |
| Need to execute 2 scripts, wait, execute 2 more wait, till end of file | halo98 | Shell Programming and Scripting | 1 | 08-01-2006 01:42 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
execute immediate issue
Hi all,
Pls consider the following script. Code:
qry="'insert into rcur_test select comp_id,site_id,ebiz_appown_no from trn_vehl
og \
where comp_id=\"$1\" \
and site_id=\"$2\" \
and ebiz_appown_no=$3 \
'"
echo $qry
sqlplus -s tms/tms@dev45 <<EOF
set serveroutput on;
declare
l_cnt number;
begin
execute immediate $qry;
commit;
select count(*) into l_cnt from rcur_test;
dbms_output.put_line("l_cnt"||l_cnt);
end;
EOF
using execute immediate.I am building the query based on the parameters passed to the shell script. The query is built correctly as follows. Code:
'insert into rcur_test select comp_id,site_id,ebiz_appown_no from trn_vehlog where comp_id='IBM' and site_id='HYD' and ebiz_appown_no=228 ' Any idea on this. cheers RRK Last edited by Yogesh Sawant; 03-19-2008 at 12:53 AM. Reason: added code tags |
|||
| Google The UNIX and Linux Forums |
| Forum Sponsor | ||
|
|