The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
.
google unix.com



High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Unix Arithmatic operation issue , datatype issue thambi Shell Programming and Scripting 23 02-19-2008 07:19 AM
awk and execute app tyger52 Shell Programming and Scripting 0 12-06-2007 09:43 PM
execute bkan77 Shell Programming and Scripting 3 07-20-2007 02:42 PM
script execute or no execute Kespinoza97 Shell Programming and Scripting 4 06-23-2007 10: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 05:42 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-19-2008
ravi raj kumar ravi raj kumar is offline
Registered User
  
 

Join Date: Dec 2006
Location: hyderabad
Posts: 102
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

in the above script i am trying to insert the data from trn_vehlog to rcur_test
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 '

But ,execute immediate is not insertng the data into rcur_test table.

Any idea on this.

cheers
RRK

Last edited by Yogesh Sawant; 03-19-2008 at 03:53 AM.. Reason: added code tags
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:55 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0