If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > reg: Dbms_Sql. (need some urgent help plz..!!)

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-19-11, 08:03
divya.s divya.s is offline
Registered User
 
Join Date: Jul 2011
Posts: 36
reg: Dbms_Sql. (need some urgent help plz..!!)

I have issue with the following code

after migrating it from oracle this is how it got compiled but it does not enter into Dbms_Sql.Parse ,Dbms_Sql.Variable_Value_VARCHAR and Dbms_Sql.Bind_Variable_VARCHAR.

DECLARE
lv_ret VARCHAR2(2000);
cur PLS_INTEGER; --:= Dbms_Sql.Open_Cursor;
fdbk PLS_INTEGER;
lv_stack INTEGER;
BEGIN
lv_stack :=(1729.78*1)*1;
Dbms_Sql.Parse(cur,'BEGIN :val := ' || lv_stack || '; ND;',Dbms_sql.Native);
Dbms_Sql.Bind_Variable_VARCHAR(cur, 'val', 'a', 2000); -- Dbms_Sql.Bind_Variable (cur, 'val', 'a', 2000);
fdbk := Dbms_Sql.EXECUTE (cur);
Dbms_Sql.Variable_Value_VARCHAR (cur, 'val', lv_ret);
Dbms_Sql.Close_cursor(cur);
lv_stack := lv_ret;
EXCEPTION WHEN OTHERS THEN
RAISE_APPLICATION_ERROR(-20020,SQLERRM);
END;
Reply With Quote
  #2 (permalink)  
Old 07-19-11, 08:05
przytula_guy przytula_guy is offline
Registered User
 
Join Date: Apr 2006
Location: Belgium
Posts: 1,159
so what is the problem : is this code for db2 as this has been submitted in the db2 forum..
__________________
Best Regards, Guy Przytula
Database Software Consultant
DB2 UDB LUW Certified V7-V8-V9-V9.7 DB Admin - Dprop..
Information Server Datastage Certified
http://www.infocura.be
Reply With Quote
  #3 (permalink)  
Old 07-19-11, 08:29
divya.s divya.s is offline
Registered User
 
Join Date: Jul 2011
Posts: 36
yes it is in db2....it gets compiled in DB2 but dsnt give out any output neither it raises any exception...!!


it just gives an empty output...
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On