Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2011
    Posts
    41

    Unanswered: 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;

  2. #2
    Join Date
    Apr 2006
    Location
    Belgium
    Posts
    2,514
    Provided Answers: 11
    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
    Good DBAs are not formed in a week or a month. They are created little by little, day by day. Protracted and patient effort is needed to develop good DBAs.
    Spoon feeding : To treat (another) in a way that discourages independent thought or action, as by overindulgence.
    DB2 UDB LUW Certified V7-V8-V9-V9.7-V10.1-V10.5 DB Admin - Advanced DBA -Dprop..
    Information Server Datastage Certified
    http://www.infocura.be

  3. #3
    Join Date
    Jul 2011
    Posts
    41
    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...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •