How to get resultset from procedure having dynamic select sql query ?

Hi,
I have created a procedure, in which there is dynamic select query. The procedure has one out put parameter which gives error code. When I compile that procedure it compiles successufully. When I run it it executes successfully and gives output error code. But I don't know how to get resultset of that dynamic select sql query. I need that.
This is the procedure:
create or replace
PROCEDURE uspGetProductDetailsMultiOrder
  v_DefinitionDBName IN VARCHAR2,
     v_CommonDBName IN VARCHAR2,
     v_Filter_FilledStatus IN VARCHAR2,
     v_Filter_Internal_Counterparty IN nvarchar2,
     v_Filter_NoteType IN nvarchar2,
     v_Filter_Exchange IN nvarchar2,
     v_Filter_Issuer IN nvarchar2,
     v_Filter_Product_Category  IN VARCHAR2,
     v_DateToFilter IN VARCHAR2,     
     v_Filter_FromDate IN VARCHAR2,
     v_Filter_ToDate IN VARCHAR2,
     v_Active_YN_Flag IN NVARCHAR2,
     v_Entity_ID IN NVARCHAR2,
     v_ErrorNumber  OUT NUMBER
   as
   v_SelectSQL  nvarchar2(32767);
      v_Setting_Name  nvarchar2(32767);
   v_Default_Value  nvarchar2(32767);
   v_Config_Value  nvarchar2(32767);
   v_CCY_ID  NUMBER(10,0);
   v_CCY_Data  nvarchar2(32767);
   v_CCY_List  nvarchar2(32767);
   v_Seq_Id  NUMBER(10,0);
   SWV_Active_YN_Flag NVARCHAR2(1);
   SWV_VarStr long;--varchar2(4000);
   SWV_TRANCOUNT NUMBER(10,0);
    SWV_fnc_SplitString_Id_var1 NUMBER(10,0);
   SWV_fnc_SplitString_Id_var0 NUMBER(10,0);
  CURSOR RestrictTermsheetVisibilityByC 
   IS select CS.Setting_Name,Default_Value,Config_Value
   from Config_Settings CS   LEFT OUTER JOIN Entity_Config EC  ON EC.Setting_ID = CS.Setting_ID
   where EC.Entity_ID = v_Entity_ID AND Setting_Level = 'ENTITY';
   CURSOR Get_RestrictCCY_List_Cursor IS SELECT Id_1,Data_1 FROM table(fnc_SplitString(v_Config_Value,','));
   --CURSOR Get_RestrictCCY_List_Cursor IS SELECT Id,Data FROM imp;
   CURSOR GetRestrictTemplateListCursor 
  -- is select id,data from imp;
   IS SELECT Id_1,Data_1 FROM table(fnc_SplitString(v_Config_Value,',')) ;
     --Parikshit 18-Jul-2010, active YN flag param added in SP
BEGIN
SWV_Active_YN_Flag := v_Active_YN_Flag;
   if SWV_Active_YN_Flag = ' '  then
      SWV_Active_YN_Flag := 'Y';
   end if;
   v_SelectSQL := ' ';
   v_SelectSQL := v_SelectSQL || ' Select ';
   v_SelectSQL := v_SelectSQL || '  NM.Note_Master_Id, NM.Product_Name, NM.Template_ID, NM.Template_Sr_No, NM.Asset, NM.Exchange, NM.Type, NM.Currency';
     --SET @SelectSQL = @SelectSQL + ' , NM.Trade_Date, NM.Value_Date, NM.Valuation_Date, NM.Maturity_Date, NM.Tenor, NM.Strike_Price_Percentage, (case when (NM.Type like '' ELN%'' or NM.Type like ''RELN%'') THEN  NOP.Issue_Price Else NM.Customer_Price End) as Customer_Price, NM.Dealer_Price, (case when (NM.Type like '' ELN%'' or NM.Type like ''RELN%'') THEN  NOP.Customer_Yield Else NM.Customer_Yield End) as Customer_Yield,  NOP.Dealer_Cost_PA as Internal_Cost '
   v_SelectSQL := v_SelectSQL || ' , NM.Trade_Date, NM.Value_Date, NM.Valuation_Date, NM.Maturity_Date, NM.Tenor, NM.Strike_Price_Percentage, (case when (NM.PriceList_YN = ''Y'') THEN  NOP.Issue_Price Else NM.Customer_Price End) as Customer_Price, NM.Dealer_Price, (case when (NM.PriceList_YN = ''Y'') THEN  NOP.Customer_Yield Else NM.Customer_Yield End) as Customer_Yield,  NOP.Dealer_Cost_PA as Internal_Cost ';
   v_SelectSQL := v_SelectSQL || ' , NM.Minimum_Issue_Size, NM.Maximum_Issue_Size, NM.Minimum_Tolerence_Amount, NM.Maximum_Tolerence_Amount, NM.Trigger_Amount_Warning, nvl(NM.PerUnit_Equivalent_Amount,1) as PerUnit_Equivalent_Amount,  NM.Active_YN_Flag, NM.Verify_YN_Flag ';
   v_SelectSQL := v_SelectSQL || ' , NM.Tranche_YN_Flag, NM.Launch_Date, NM.Open_Date, NM.Close_Date, NM.PreHedged_YN, NM.Created_By, NM.Created_At,  NM.Verified_At, NM.Verified_By, NM.ISIN, NM.Issuer';
   v_SelectSQL := v_SelectSQL || ' , NM.Product_Catagory as Product_Category, NM.Note_Issuer_Type as Issuer_Category, NM.Series_No as Series_No, NM.Minimum_Investment_Amount ';
     --Added by Parikshit on 14-Jun-2011, to remove the unwinding amounts from the total issue size
     --SET @SelectSQL = @SelectSQL + ' , NOP.LastTimeWhenProductModified,NOP.Nominal_Amount as Current_Issue_Size, NOP.Filled_Status, NM.Counterparty as Internal_Counterparty  '
   v_SelectSQL := v_SelectSQL || ' , NOP.LastTimeWhenProductModified,(NOP.Nominal_Amount - nvl(ND.Unwind_Amount,0) ) as Current_Issue_Size, NOP.Filled_Status, NM.Counterparty as Internal_Counterparty  ';
     --********************************************************END
   v_SelectSQL := v_SelectSQL || ' ,T2.Confirmed_Amount, T2.Confirmed_Shares';
   v_SelectSQL := v_SelectSQL || ' , T3.Live_Deals';
   v_SelectSQL := v_SelectSQL || ' , BS.Net_Trade_Hedged, BS.Net_Trade_Outstanding, BS.Hedged_Nominal_BUY, BS.Hedged_Nominal_SELL, BS.Outstanding_Nominal_BUY, BS.Outstanding_Nominal_SELL   ';
   v_SelectSQL := v_SelectSQL || ' , ( case    When UPPER(NM.PreHedged_YN) = ''Y'' Then ''Launched'' ';
   v_SelectSQL := v_SelectSQL || '              When ((NM.Maturity_Date IS  NOT NULL) AND to_date(NM.Maturity_Date) <= to_date(sysdate)) Then ''Matured''';
   v_SelectSQL := v_SelectSQL || '              When (UPPER(NM.PreHedged_YN) = ''N'' AND NM.Launch_Date IS NOT NULL)  Then ''Launched''';     
     --Ready to launch
   v_SelectSQL := v_SelectSQL || '              When (UPPER(NM.PreHedged_YN) = ''N'' AND NM.Launch_Date  IS  NULL AND (T2.Confirmed_Amount >= NM.Minimum_Issue_Size) AND  to_date(Close_Date) > to_date(sysdate) ) Then ''Ready To Launch''';     
     --Ready to launch
   v_SelectSQL := v_SelectSQL || '              When (UPPER(NM.PreHedged_YN) = ''N'' AND NM.Launch_Date  IS  NULL AND (T2.Confirmed_Amount >= (NM.Minimum_Issue_Size - NM.Minimum_Tolerence_Amount)) AND  to_date(Close_Date)= to_date(sysdate)    )  Then ''Ready To Launch''';     
   v_SelectSQL := v_SelectSQL || '              When (UPPER(NM.PreHedged_YN) = ''N'' AND NM.Launch_Date  IS  NULL AND (T2.Confirmed_Amount >= (NM.Minimum_Issue_Size - NM.Minimum_Tolerence_Amount)) AND  to_date(Close_Date)< to_date(sysdate)    )  Then ''Ready To Launch''';     
     --Warning trigger reached
   v_SelectSQL := v_SelectSQL || '              When (UPPER(NM.PreHedged_YN) = ''N'' AND NM.Launch_Date IS  NOT NULL AND (T2.Confirmed_Amount >= NM.Trigger_Amount_Warning ))  Then ''Warning Trigger Reached''';          
   v_SelectSQL := v_SelectSQL || '              Else ''Not Ready'' ';
   v_SelectSQL := v_SelectSQL || '              End)Launch_Status';
   v_SelectSQL := v_SelectSQL || ' , NI.Issuer_Code';
      v_SelectSQL := v_SelectSQL || ' , (nvl(NOP.Nominal_Amount,0) - nvl(T2.Confirmed_Amount,0)) as Unconfirmed_Amount, NM.Upfront as Upfront,   case when UPPER(NM.PreHedged_YN) = ''Y'' THEN 0 else (nvl(T2.Confirmed_Amount,0) - nvl(BS.Net_Trade_Hedged,0)) end as ReadyToHedge';
      v_SelectSQL := v_SelectSQL || ' , NOP.Hard_Margin  as Margin_Amount, NM.YearBasis as YearBasis, NM.Note_Product_Rating as Equity_Risk_Score, AD.Equity_Asset_Class ';
      v_SelectSQL := v_SelectSQL || '  , NM.Note_Product_Rating as Product_Rating,  NOP.PO_ID, AD.LotSize as Lot_Size, NM.Max_Orders_Per_Product as MAX_Orders, NOP.Order_Count as Current_Order_Count,  nvl(NM.Denomination_Ccy,NM.Currency) as Denomination_Ccy, NM.Note_Scheme_Type as Underlying_Type, NM.Note_Asset_Class as Asset_Class, NULL as Product_Created_YN, NULL as Product_Created_ID,  ( (case when NM.Note_Order_Type = '''' then N''Market'' else NM.Note_Order_Type end )  ) as  Order_Type, NOP.Spot_Price, NM.Note_Price_Link, NOP.Strike_Price, NVL(NM.C_Fixing_Frequency,''Atmaturity'') as Fixing_Frequency, NM.Document_Uploaded_YN, NM.Document_Uploaded_At, NM.Document_Uploaded_By, NM.Document_File_Name, NM.Document_File_Extension, NM.Document_File_Path, NM.CutOff_Time, NM.Soft_Tenor, NM.NM_Sn_Code_All, NULL as Note_Price_Source, AD.LongName, NVL(NM.Pricelist_YN,''N'') as Pricelist_YN, AD.AlternateIdentifierAlias as Underlying, NM.Note_Issuer_Date_Offset, NM.Counterparty as Note_Counter_Party, NULL as
Note_Premium_PC  ';
   v_SelectSQL := v_SelectSQL || '  , NI.Issuer_Name, IP.Issuer_Id, IP.Broad_Cash, IP.Odd_Cash, IP.Account_Note, IP.Rounding, IP.Decimal_Truncate, IP.Misc1 as Recidual_YN, NM.Note_Issuer_Type, NM.Target_Coupon, C_Fixing_Frequency as C_Fixing_Frequency, NM.Callable_Frequency as Callable_Frequency, NM.Strike_Price_Percentage as C_Note_Strike_PC, NM.NM_Airbag_PC as  Airbag_PC, C_Note_Barrier_PC as C_Note_Barrier_PC, TM.Template_Name, ''Product'' as Record_Type, NM.C_Settlement_Frequency, NM.Coupon_Frequency, NM.NM_Fixing_Source as Note_Fixing_Source, NM.Order_Entry_Type, (nvl(NM.Minimum_Issue_Size,0) - nvl(T2.Confirmed_Amount,0)) as Remaining_Launch_Amount, NM.C_Fixing_Start_Point, NM.C_Fixing_End_Point, NM.Order_Entry_Type, SC.Scheme_Alias, SC.Scheme_Name, CM.CM_ID, CM.CM_Name as Counterparty_Name, NM.NM_Other_Features as Other_Features, NM.Strike_Price_Percentage as Accrual_Strike, NM.NM_KnockIn as KnockIn, NM.NM_Airbag_Type, NM.NM_Put_strike as Put_Strike, NM.NM_Accrual_Strike,
NM.NM_Counterparty_Upfront,  NM.Price_Updated_YN as Prices_Updated_YN, AD.Code as Asset_Name,NULL as KO_FREQ_TYPE, NM.Daily_Accumalation_Equities, NM.MaxNoAcc_days, NM.Guaranteed_Days, NM.Leverage_ratio, NM.NORM_IF, NM.NORM_PAIR, NM.NORM_FXRate ';
   v_SelectSQL := v_SelectSQL || ' from ';
   v_SelectSQL := v_SelectSQL || v_CommonDBName|| '.Note_Master NM  ';
   v_SelectSQL := v_SelectSQL || 'Left Outer Join ';
   v_SelectSQL := v_SelectSQL || v_CommonDBName||'.Issuer_Master NI ';
      v_SelectSQL := v_SelectSQL || ' On NM.Issuer = (case when  ISNUMERIC(NM.Issuer) = 0  then  cast (NI.Issuer_Name as nvarchar2(25))  else  cast(NI.Issuer_Id as nvarchar2(25)) end )';     
   v_SelectSQL := v_SelectSQL || ' Left Outer Join ';
   v_SelectSQL := v_SelectSQL || v_CommonDBName||'.Note_Order_Product NOP ';
   v_SelectSQL := v_SelectSQL || ' On NOP.Note_Master_ID = NM.Note_Master_ID';
   v_SelectSQL := v_SelectSQL || ' Left Outer Join ';
   v_SelectSQL := v_SelectSQL || v_DefinitionDBName||'.AssetDef AD ';
   v_SelectSQL := v_SelectSQL || ' On AD.Code = NM.Asset';
     v_SelectSQL := v_SelectSQL || ' AND AD.TypeAsset  = substr(NM.Note_Asset_Class,1,2) ';
   v_SelectSQL := v_SelectSQL || ' Left Outer Join ';
   v_SelectSQL := v_SelectSQL || v_CommonDBName||'.Issuer_Parameter IP ';
      v_SelectSQL := v_SelectSQL || ' On NM.Issuer = (case when  ISNUMERIC(NM.Issuer) = 0  then  cast (IP.Issuer_Name as nvarchar2(25))  else  cast(IP.Issuer_Id as nvarchar2(25)) end )';
   v_SelectSQL := v_SelectSQL || ' Left Outer Join ';
   v_SelectSQL := v_SelectSQL || v_CommonDBName||'.Template_Master TM ';
   v_SelectSQL := v_SelectSQL || ' On  TM.Template_Id =  NM.Template_ID ';
   v_SelectSQL := v_SelectSQL || ' Left Outer Join ';
   v_SelectSQL := v_SelectSQL || v_CommonDBName||'.Scheme_Codes SC ';
   v_SelectSQL := v_SelectSQL || ' On  SC.Scheme_Alias =  NM.Type';     
   v_SelectSQL := v_SelectSQL || ' Left Outer Join ';
   v_SelectSQL := v_SelectSQL || v_CommonDBName||'.Counterparty_Master CM ';
   v_SelectSQL := v_SelectSQL || ' On  CM.CM_ID =  NM.Counterparty';     
      v_SelectSQL := v_SelectSQL || ' Left Outer Join      ';
   v_SelectSQL := v_SelectSQL || ' ( ';
   v_SelectSQL := v_SelectSQL || ' Select Note_master_ID, sum(Nominal_Amt) as Unwind_Amount from ';
   v_SelectSQL := v_SelectSQL || v_CommonDBName||'.Note_Deals ';
   v_SelectSQL := v_SelectSQL || ' where Prematurity_Date IS NOT NULL';
   v_SelectSQL := v_SelectSQL || ' AND (UPPER(Deletion_Reason ) = ''PART REDEMPTION'' or UPPER(Deletion_Reason ) = ''FULL REDEMPTION'')';
   v_SelectSQL := v_SelectSQL || ' Group by Note_master_ID ';
   v_SelectSQL := v_SelectSQL || ' ) ND ';
   v_SelectSQL := v_SelectSQL || ' On  ND.Note_Master_ID =  NM.Note_Master_ID';
if  (v_Filter_FilledStatus = ' ' OR UPPER(v_Filter_FilledStatus) = 'ALL' ) then
      v_SelectSQL := v_SelectSQL || ' ';
   else
      v_SelectSQL := v_SelectSQL || ' AND NOP.Filled_Status IN (' || v_Filter_FilledStatus  || ')';
   end if;                         
     --AND NOP.Internal_Counterparty = 'DEFAULT''
   if(SUBSTR(to_char(v_Filter_Internal_Counterparty),1,4000)= ' ')  then
      v_SelectSQL := v_SelectSQL || ' ';
   else
      v_SelectSQL := v_SelectSQL || ' AND NOP.Internal_Counterparty IN (' || v_Filter_Internal_Counterparty || ')';
   end if;                    
     --SET @SelectSQL = @SelectSQL + ' --Filter--'
   v_SelectSQL := v_SelectSQL || ' LEFT OUTER JOIN ';
   v_SelectSQL := v_SelectSQL || ' (';
   v_SelectSQL := v_SelectSQL || '   select Note_Master_ID, sum(Nominal_Amount) As Confirmed_Amount, sum(No_Of_Shares)  As Confirmed_Shares  ';
   v_SelectSQL := v_SelectSQL || '   from '||v_CommonDBName||'.Note_Order_RM  ';
   v_SelectSQL := v_SelectSQL || '   Where substr(UPPER(Order_Status_Flag),1,6) = ''YYYYYY'' AND substr(substr(UPPER(Order_Status_Flag),1,7),-1,1) = ''N'' ';
   v_SelectSQL := v_SelectSQL || '   group by  Note_Master_ID';
   v_SelectSQL := v_SelectSQL || ' ) T2';
   v_SelectSQL := v_SelectSQL || ' ON T2.Note_Master_ID = NM.Note_Master_ID';
   v_SelectSQL := v_SelectSQL || ' LEFT OUTER JOIN';
   v_SelectSQL := v_SelectSQL || ' (';
   v_SelectSQL := v_SelectSQL || '   Select ND.Note_Master_ID, sum(ND.Nominal_Amt) As Live_Deals ';
   v_SelectSQL := v_SelectSQL || '   from '||v_CommonDBName||'.Note_Deals ND  ';
   v_SelectSQL := v_SelectSQL || '   where ND.Active_YNFlag = ''Y'' ';
   v_SelectSQL := v_SelectSQL || '   group by  Note_Master_ID';
   v_SelectSQL := v_SelectSQL || ' ) T3';
   v_SelectSQL := v_SelectSQL || ' ON T3.Note_Master_ID = NM.Note_Master_ID';
   v_SelectSQL := v_SelectSQL || '  LEFT OUTER JOIN';
   v_SelectSQL := v_SelectSQL || '  (';
   v_SelectSQL := v_SelectSQL || '  SELECT NH_Note_Master_ID,';
   v_SelectSQL := v_SelectSQL || '  (CAST(SUM(Hedged_Nominal_Buy) AS BINARY_FLOAT) -CAST(SUM(Hedged_Nominal_Sell) AS BINARY_FLOAT))  Net_Trade_Hedged,';
   v_SelectSQL := v_SelectSQL || '  (CAST(SUM(Outstanding_Nominal_BUY) AS BINARY_FLOAT) -CAST(SUM(Outstanding_Nominal_SELL) AS BINARY_FLOAT))  Net_Trade_Outstanding,';
   v_SelectSQL := v_SelectSQL || '  SUM(Hedged_Nominal_BUY) AS Hedged_Nominal_BUY,';
   v_SelectSQL := v_SelectSQL || '  SUM(Hedged_Nominal_SELL) AS Hedged_Nominal_SELL,';
   v_SelectSQL := v_SelectSQL || '  SUM(Outstanding_Nominal_BUY) AS Outstanding_Nominal_BUY,';
   v_SelectSQL := v_SelectSQL || '  SUM(Outstanding_Nominal_SELL) As Outstanding_Nominal_SELL';
   v_SelectSQL := v_SelectSQL || '  From';
   v_SelectSQL := v_SelectSQL || '  (';
   v_SelectSQL := v_SelectSQL || '  SELECT NH_Note_Master_ID,';
   v_SelectSQL := v_SelectSQL || '  SUM(NH_Hedged_Nominal) AS Hedged_Nominal_BUY, 0 AS Hedged_Nominal_SELL,';
   v_SelectSQL := v_SelectSQL || '  SUM(NH_Outstanding_Nominal) AS Outstanding_Nominal_BUY, 0 AS Outstanding_Nominal_SELL';
   v_SelectSQL := v_SelectSQL || '  FROM '||v_CommonDBName||'.Note_Hedge  ';
   v_SelectSQL := v_SelectSQL || '  WHERE NH_Direction = ''BUY'' ';
   v_SelectSQL := v_SelectSQL || '  GROUP BY NH_Note_Master_ID';
   v_SelectSQL := v_SelectSQL || '  Union';
   v_SelectSQL := v_SelectSQL || '  SELECT NH_Note_Master_ID,';
   v_SelectSQL := v_SelectSQL || '  0 AS Hedged_Nominal_BUY, SUM(NH_Hedged_Nominal) AS Hedged_Nominal_SELL,';
   v_SelectSQL := v_SelectSQL || '  0 AS Outstanding_Nominal_BUY, SUM(NH_Outstanding_Nominal) AS Outstanding_Nominal_SELL';
   v_SelectSQL := v_SelectSQL || '  FROM '||v_CommonDBName||'.Note_Hedge  ';
   v_SelectSQL := v_SelectSQL || '  WHERE NH_Direction = ''SELL''  ';
   v_SelectSQL := v_SelectSQL || '  GROUP BY NH_Note_Master_ID';
   v_SelectSQL := v_SelectSQL || '  ) ';
   v_SelectSQL := v_SelectSQL || '  GROUP BY NH_Note_Master_ID';
   v_SelectSQL := v_SelectSQL || '  ) BS';
   v_SelectSQL := v_SelectSQL || '  ON BS.NH_Note_Master_ID = NM.Note_Master_ID';
   v_SelectSQL := v_SelectSQL || ' Where NM.Verify_YN_Flag = ''Y'' ';
  v_SelectSQL := v_SelectSQL || ' AND NM.Active_YN_Flag = ''' || SWV_Active_YN_Flag || '''';
   if(SUBSTR(to_char(v_Filter_NoteType),1,4000) = ' ' OR UPPER(v_Filter_NoteType) = 'ALL' ) then
           v_SelectSQL := v_SelectSQL || ' ';
   else
      v_SelectSQL := v_SelectSQL || ' AND NM.Type IN (' || v_Filter_NoteType  || ')';
   end if;     
IF UPPER(v_Entity_ID) <> 'ALL'  then
      OPEN RestrictTermsheetVisibilityByC;
      FETCH RestrictTermsheetVisibilityByC INTO v_Setting_Name,v_Default_Value,v_Config_Value;
      WHILE RestrictTermsheetVisibilityByC%FOUND   LOOP
     --2) Convert comma separated ccy (CNY,HKD,USD) string to single quote ccy with comma separated Ccy ('CNY','HKD','USD') string
         if (UPPER(v_Setting_Name) = 'RESTRICT_TERMSHEET_VISIBILITY_BY_CCY')  then
            if v_Config_Value is not null  then
          SELECT COUNT(Id_1) INTO SWV_fnc_SplitString_Id_var0 FROM TABLE(fnc_SplitString(v_Config_Value,',')) ;
               IF (SWV_fnc_SplitString_Id_var0 > 0)  then
                    --print 'Before Single  quote separated ccy : ' + '''' + @Config_Value + ''''
                  v_Seq_Id := 0;
                  OPEN Get_RestrictCCY_List_Cursor;
                  FETCH Get_RestrictCCY_List_Cursor
                  INTO v_CCY_ID,v_CCY_Data;
                  WHILE Get_RestrictCCY_List_Cursor%FOUND   LOOP
                     if v_Seq_Id = 0  then
                        v_CCY_List := '''' || v_CCY_Data || '''';
                     else
                        v_CCY_List := v_CCY_List || ',' || '''' || v_CCY_Data || '''';
                     end if;
                     v_Seq_Id := v_Seq_Id+1;
                     FETCH Get_RestrictCCY_List_Cursor INTO v_CCY_ID,v_CCY_Data;
                  END LOOP;
                  CLOSE Get_RestrictCCY_List_Cursor;
                    --print 'After Single quote ccy : ' + @CCY_List
                  v_SelectSQL := v_SelectSQL || ' AND nvl(NM.Denomination_Ccy,NM.Currency) NOT IN (' || v_CCY_List   || ')';
               end if;
            end if;
         end if;
--3) Convert comma separated template (ELN,BELN,BELN_B) string to single quote template code with comma separated template ('ELN','BELN','BELN_B') string
         if (UPPER(v_Setting_Name) = 'RESTRICT_TERMSHEET_VISIBILITY_BY_SUBSCHEME')  then
            if v_Config_Value is not null then
      SELECT COUNT(Id_1) INTO SWV_fnc_SplitString_Id_var1 FROM TABLE(fnc_SplitString(v_Config_Value,',')) ;
               IF (SWV_fnc_SplitString_Id_var1 > 0)  then
                  v_Seq_Id := 0;
                  OPEN GetRestrictTemplateListCursor;
                  FETCH GetRestrictTemplateListCursor
                  INTO v_CCY_ID,v_CCY_Data;
                  WHILE GetRestrictTemplateListCursor%FOUND 
                  LOOP
                     if v_Seq_Id = 0  then
                        v_CCY_List := '''' || v_CCY_Data || '''';
                     else
                        v_CCY_List := v_CCY_List || ',' || '''' || v_CCY_Data || '''';
                     end if;
                     v_Seq_Id := v_Seq_Id+1;
                     FETCH GetRestrictTemplateListCursor INTO v_CCY_ID,v_CCY_Data;
                  END LOOP;
                  CLOSE GetRestrictTemplateListCursor;
               --print 'After Single quote template code: ' + @CCY_List
                  v_SelectSQL := v_SelectSQL || ' AND TM.Template_Code NOT IN (' || v_CCY_List   || ')';
               end if;
            end if;
         end if;
         FETCH RestrictTermsheetVisibilityByC INTO v_Setting_Name,v_Default_Value,v_Config_Value;
      END LOOP;
      CLOSE RestrictTermsheetVisibilityByC;
   end if;
  if  (v_Filter_Exchange = ' ' OR UPPER(v_Filter_Exchange) = 'ALL')  then
      v_SelectSQL := v_SelectSQL || ' ';
   else
      v_SelectSQL := v_SelectSQL || ' AND NM.Exchange IN (' || v_Filter_Exchange  || ')';
   end if;                         
     --SET @SelectSQL = @SelectSQL + ' --AND NM.Issuer = 4'
  if  (v_Filter_Issuer = ' ' OR UPPER(v_Filter_Issuer) = 'ALL') then
      v_SelectSQL := v_SelectSQL || ' ';
   else
      v_SelectSQL := v_SelectSQL || ' AND NM.Issuer IN (' || v_Filter_Issuer  || ')';
   end if;     
      if  v_Filter_Product_Category    = ' '  then
      v_SelectSQL := v_SelectSQL || ' ';
   else
      v_SelectSQL := v_SelectSQL || ' AND UPPER(NM.Note_Issuer_Type) IN (''' || v_Filter_Product_Category  || ''')';
   end if;          
   if UPPER(v_DateToFilter) = 'NA'  then
      v_SelectSQL := v_SelectSQL || ' ';
   else
      if UPPER(v_DateToFilter) = 'CLOSE_DATE'  then
         v_SelectSQL := v_SelectSQL || ' AND to_char( '|| v_DateToFilter || ') >= to_date(''' || v_Filter_ToDate ||  ''');
                         -- AND convert(smalldatetime,''' || v_Filter_ToDate || ''',106) ';
      else
         v_SelectSQL := v_SelectSQL || ' AND to_char(''' || v_DateToFilter || ''') BETWEEN to_date(''' || v_Filter_FromDate ||  ''') AND to_date(''' || v_Filter_ToDate || ''') ';
      end if;
   end if;
   v_SelectSQL := v_SelectSQL || ' Order by NM.Product_Name';
   SWV_VarStr := v_SelectSQL;
   DBMS_OUTPUT.PUT_LINE(SWV_VarStr);
   EXECUTE IMMEDIATE SWV_VarStr;
   IF SQLCODE <> 0  then
      GOTO ERROR_HANDLER;
   end if;
   IF SQL%rowcount > 0  then
      COMMIT;
      SWV_TRANCOUNT := SWV_TRANCOUNT -1;
   end if;     --Commit Transaction
   v_ErrorNumber := SQLCODE;
   RETURN;
   << ERROR_HANDLER >> v_ErrorNumber := SQLCODE;
   ROLLBACK;
   SWV_TRANCOUNT := 0;     --Rollback Transaction
   RETURN;
END;Please suggest something. Thanks
Edited by: BluShadow on 30-Nov-2011 11:00
added {noformat}{noformat} tags for formatting of code.  Please read {message:id=9360002} to learn to do this yourself in future.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Connecting to the database sample_adf_finiq_common.
Select NM.Note_Master_Id, NM.Product_Name, NM.Template_ID, NM.Template_Sr_No, NM.Asset, NM.Exchange, NM.Type, NM.Currency , NM.Trade_Date, NM.Value_Date, NM.Valuation_Date, NM.Maturity_Date, NM.Tenor, NM.Strike_Price_Percentage, (case when (NM.PriceList_YN = 'Y') THEN NOP.Issue_Price Else NM.Customer_Price End) as Customer_Price, NM.Dealer_Price, (case when (NM.PriceList_YN = 'Y') THEN NOP.Customer_Yield Else NM.Customer_Yield End) as Customer_Yield, NOP.Dealer_Cost_PA as Internal_Cost , NM.Minimum_Issue_Size, NM.Maximum_Issue_Size, NM.Minimum_Tolerence_Amount, NM.Maximum_Tolerence_Amount, NM.Trigger_Amount_Warning, nvl(NM.PerUnit_Equivalent_Amount,1) as PerUnit_Equivalent_Amount, NM.Active_YN_Flag, NM.Verify_YN_Flag , NM.Tranche_YN_Flag, NM.Launch_Date, NM.Open_Date, NM.Close_Date, NM.PreHedged_YN, NM.Created_By, NM.Created_At, NM.Verified_At, NM.Verified_By, NM.ISIN, NM.Issuer , NM.Product_Catagory as Product_Category, NM.Note_Issuer_Type as Issuer_Category, NM.Series_No as Series_No, NM.Minimum_Investment_Amount , NOP.LastTimeWhenProductModified,(NOP.Nominal_Amount - nvl(ND.Unwind_Amount,0) ) as Current_Issue_Size, NOP.Filled_Status, NM.Counterparty as Internal_Counterparty ,T2.Confirmed_Amount, T2.Confirmed_Shares , T3.Live_Deals , BS.Net_Trade_Hedged, BS.Net_Trade_Outstanding, BS.Hedged_Nominal_BUY, BS.Hedged_Nominal_SELL, BS.Outstanding_Nominal_BUY, BS.Outstanding_Nominal_SELL , ( case When UPPER(NM.PreHedged_YN) = 'Y' Then 'Launched' When ((NM.Maturity_Date IS NOT NULL) AND to_date(NM.Maturity_Date) <= to_date(sysdate)) Then 'Matured' When (UPPER(NM.PreHedged_YN) = 'N' AND NM.Launch_Date IS NOT NULL) Then 'Launched' When (UPPER(NM.PreHedged_YN) = 'N' AND NM.Launch_Date IS NULL AND (T2.Confirmed_Amount >= NM.Minimum_Issue_Size) AND to_date(Close_Date) > to_date(sysdate) ) Then 'Ready To Launch' When (UPPER(NM.PreHedged_YN) = 'N' AND NM.Launch_Date IS NULL AND (T2.Confirmed_Amount >= (NM.Minimum_Issue_Size - NM.Minimum_Tolerence_Amount)) AND to_date(Close_Date)= to_date(sysdate) ) Then 'Ready To Launch' When (UPPER(NM.PreHedged_YN) = 'N' AND NM.Launch_Date IS NULL AND (T2.Confirmed_Amount >= (NM.Minimum_Issue_Size - NM.Minimum_Tolerence_Amount)) AND to_date(Close_Date)< to_date(sysdate) ) Then 'Ready To Launch' When (UPPER(NM.PreHedged_YN) = 'N' AND NM.Launch_Date IS NOT NULL AND (T2.Confirmed_Amount >= NM.Trigger_Amount_Warning )) Then 'Warning Trigger Reached' Else 'Not Ready' End)Launch_Status , NI.Issuer_Code , (nvl(NOP.Nominal_Amount,0) - nvl(T2.Confirmed_Amount,0)) as Unconfirmed_Amount, NM.Upfront as Upfront, case when UPPER(NM.PreHedged_YN) = 'Y' THEN 0 else (nvl(T2.Confirmed_Amount,0) - nvl(BS.Net_Trade_Hedged,0)) end as ReadyToHedge , NOP.Hard_Margin as Margin_Amount, NM.YearBasis as YearBasis, NM.Note_Product_Rating as Equity_Risk_Score, AD.Equity_Asset_Class , NM.Note_Product_Rating as Product_Rating, NOP.PO_ID, AD.LotSize as Lot_Size, NM.Max_Orders_Per_Product as MAX_Orders, NOP.Order_Count as Current_Order_Count, nvl(NM.Denomination_Ccy,NM.Currency) as Denomination_Ccy, NM.Note_Scheme_Type as Underlying_Type, NM.Note_Asset_Class as Asset_Class, NULL as Product_Created_YN, NULL as Product_Created_ID, ( (case when NM.Note_Order_Type = '' then N'Market' else NM.Note_Order_Type end ) ) as Order_Type, NOP.Spot_Price, NM.Note_Price_Link, NOP.Strike_Price, NVL(NM.C_Fixing_Frequency,'Atmaturity') as Fixing_Frequency, NM.Document_Uploaded_YN, NM.Document_Uploaded_At, NM.Document_Uploaded_By, NM.Document_File_Name, NM.Document_File_Extension, NM.Document_File_Path, NM.CutOff_Time, NM.Soft_Tenor, NM.NM_Sn_Code_All, NULL as Note_Price_Source, AD.LongName, NVL(NM.Pricelist_YN,'N') as Pricelist_YN, AD.AlternateIdentifierAlias as Underlying, NM.Note_Issuer_Date_Offset, NM.Counterparty as Note_Counter_Party, NULL as
Note_Premium_PC , NI.Issuer_Name, IP.Issuer_Id, IP.Broad_Cash, IP.Odd_Cash, IP.Account_Note, IP.Rounding, IP.Decimal_Truncate, IP.Misc1 as Recidual_YN, NM.Note_Issuer_Type, NM.Target_Coupon, C_Fixing_Frequency as C_Fixing_Frequency, NM.Callable_Frequency as Callable_Frequency, NM.Strike_Price_Percentage as C_Note_Strike_PC, NM.NM_Airbag_PC as Airbag_PC, C_Note_Barrier_PC as C_Note_Barrier_PC, TM.Template_Name, 'Product' as Record_Type, NM.C_Settlement_Frequency, NM.Coupon_Frequency, NM.NM_Fixing_Source as Note_Fixing_Source, NM.Order_Entry_Type, (nvl(NM.Minimum_Issue_Size,0) - nvl(T2.Confirmed_Amount,0)) as Remaining_Launch_Amount, NM.C_Fixing_Start_Point, NM.C_Fixing_End_Point, NM.Order_Entry_Type, SC.Scheme_Alias, SC.Scheme_Name, CM.CM_ID, CM.CM_Name as Counterparty_Name, NM.NM_Other_Features as Other_Features, NM.Strike_Price_Percentage as Accrual_Strike, NM.NM_KnockIn as KnockIn, NM.NM_Airbag_Type, NM.NM_Put_strike as Put_Strike, NM.NM_Accrual_Strike,
NM.NM_Counterparty_Upfront, NM.Price_Updated_YN as Prices_Updated_YN, AD.Code as Asset_Name,NULL as KO_FREQ_TYPE, NM.Daily_Accumalation_Equities, NM.MaxNoAcc_days, NM.Guaranteed_Days, NM.Leverage_ratio, NM.NORM_IF, NM.NORM_PAIR, NM.NORM_FXRate from Sample_ADF_finiq_Common.Note_Master NM Left Outer Join Sample_ADF_finiq_Common.Issuer_Master NI On NM.Issuer = (case when ISNUMERIC(NM.Issuer) = 0 then cast (NI.Issuer_Name as nvarchar2(25)) else cast(NI.Issuer_Id as nvarchar2(25)) end ) Left Outer Join Sample_ADF_finiq_Common.Note_Order_Product NOP On NOP.Note_Master_ID = NM.Note_Master_ID Left Outer Join Sample_ADF_finiq_Common.AssetDef AD On AD.Code = NM.Asset AND AD.TypeAsset = substr(NM.Note_Asset_Class,1,2) Left Outer Join Sample_ADF_finiq_Common.Issuer_Parameter IP On NM.Issuer = (case when ISNUMERIC(NM.Issuer) = 0 then cast (IP.Issuer_Name as nvarchar2(25)) else cast(IP.Issuer_Id as nvarchar2(25)) end ) Left Outer Join Sample_ADF_finiq_Common.Template_Master TM On TM.Template_Id = NM.Template_ID Left Outer Join Sample_ADF_finiq_Common.Scheme_Codes SC On SC.Scheme_Alias = NM.Type Left Outer Join Sample_ADF_finiq_Common.Counterparty_Master CM On CM.CM_ID = NM.Counterparty Left Outer Join      ( Select Note_master_ID, sum(Nominal_Amt) as Unwind_Amount from Sample_ADF_finiq_Common.Note_Deals where Prematurity_Date IS NOT NULL AND (UPPER(Deletion_Reason ) = 'PART REDEMPTION' or UPPER(Deletion_Reason ) = 'FULL REDEMPTION') Group by Note_master_ID ) ND On ND.Note_Master_ID = NM.Note_Master_ID AND NOP.Internal_Counterparty IN (1) LEFT OUTER JOIN ( select Note_Master_ID, sum(Nominal_Amount) As Confirmed_Amount, sum(No_Of_Shares) As Confirmed_Shares from Sample_ADF_finiq_Common.Note_Order_RM Where substr(UPPER(Order_Status_Flag),1,6) = 'YYYYYY' AND substr(substr(UPPER(Order_Status_Flag),1,7),-1,1) = 'N' group by Note_Master_ID ) T2 ON T2.Note_Master_ID = NM.Note_Master_ID LEFT OUTER JOIN ( Select ND.Note_Master_ID, sum(ND.Nominal_Amt) As Live_Deals from Sample_ADF_finiq_Common.Note_Deals ND where ND.Active_YNFlag = 'Y' group by Note_Master_ID ) T3 ON T3.Note_Master_ID = NM.Note_Master_ID LEFT OUTER JOIN ( SELECT NH_Note_Master_ID, (CAST(SUM(Hedged_Nominal_Buy) AS BINARY_FLOAT) -CAST(SUM(Hedged_Nominal_Sell) AS BINARY_FLOAT)) Net_Trade_Hedged, (CAST(SUM(Outstanding_Nominal_BUY) AS BINARY_FLOAT) -CAST(SUM(Outstanding_Nominal_SELL) AS BINARY_FLOAT)) Net_Trade_Outstanding, SUM(Hedged_Nominal_BUY) AS Hedged_Nominal_BUY, SUM(Hedged_Nominal_SELL) AS Hedged_Nominal_SELL, SUM(Outstanding_Nominal_BUY) AS Outstanding_Nominal_BUY, SUM(Outstanding_Nominal_SELL) As Outstanding_Nominal_SELL From ( SELECT NH_Note_Master_ID, SUM(NH_Hedged_Nominal) AS Hedged_Nominal_BUY, 0 AS Hedged_Nominal_SELL, SUM(NH_Outstanding_Nominal) AS Outstanding_Nominal_BUY, 0 AS Outstanding_Nominal_SELL FROM Sample_ADF_finiq_Common.Note_Hedge WHERE NH_Direction = 'BUY' GROUP BY NH_Note_Master_ID Union SELECT NH_Note_Master_ID, 0 AS Hedged_Nominal_BUY, SUM(NH_Hedged_Nominal) AS Hedged_Nominal_SELL, 0 AS Outstanding_Nominal_BUY, SUM(NH_Outstanding_Nominal) AS Outstanding_Nominal_SELL FROM Sample_ADF_finiq_Common.Note_Hedge WHERE NH_Direction = 'SELL' GROUP BY NH_Note_Master_ID ) GROUP BY NH_Note_Master_ID ) BS ON BS.NH_Note_Master_ID = NM.Note_Master_ID Where NM.Verify_YN_Flag = 'Y' AND NM.Active_YN_Flag = 'Y' AND UPPER(NM.Note_Issuer_Type) IN ('Internal') AND to_char('16-oct-11') BETWEEN to_date('15-oct-11') AND to_date('17-oct-11') Order by NM.Product_Name
V_ERRORNUMBER = 0
Process exited.
Disconnecting from the database sample_adf_finiq_common.
here v_errornumber=0 is the output when i run it in oracle sql developer.

Similar Messages

  • How to get resultset from oracle procedure use ejb3

    how to get resultset from oracle procedure use ejb3
    i know oracle procedure should like this
    Create or replace PROCEDURE resultset_test(
    aaa IN NUMBER,
    bbb OUT sys_refcursor) ....
    but what s the ejb3 scripts looks like? please give me an example or link~
    ths

    - there are no EJB3 scripts, only compiled application code
    - the part of the EJB spec that deals with databases is called the Java Persistence API, but likely you are just looking for the JDBC API.
    Now you should know what to Google to get your "example script": "java jdbc oracle procedure"

  • How to get tax break up of TDS using SQL query ?

    Hi all,
    We are developing a TDS report using SQL query
    Report will contain VendorCode,Date(ap inv date),Vendor name,
    Bill value,TDS Amount,
    Bill Value – 100.000,
    TDS (2%) - 2.000,
    TDS Surcharge(10% on TDS) - 0.2,
    TDS Cess(2%(TDS+TDS Surcharge)) - 0.044,
    TDS HeCess(1%(TDS+TDS Surcharge)) - 0.022.
    We have developed this report which displays upto
    VendorCode,Date(ap inv date),Vendor name,
    Bill value,TDS Amount.
    How to show tax break up of TDS in SQL query ?
    Thanks,
    With regards,
    Jeyakanthan.

    Hi gauraw,
    Thank for your reply.
    I modified the query , pasted the query
    as below in query generator,
    Select T0.DocNum,T0.DocDate,T0.CardCode as 'Ledger',T1.TaxbleAmnt As 'Bill value',T1.WTAmnt as 'TDSAmt',(TDSAmt * 0.1) as 'TDS_Surch',
    (((TDSAmt0.1) + TDSAmt)0.02)  as 'TDSCess',
    (((TDSAmt0.1) + TDSAmt)0.01)  as 'TDSHCess'
    FROM OPCH T0  INNER JOIN PCH5 T1 ON T0.DocEntry = T1.AbsEntry
    WHERE (T0.DocDate >= '[%0]' and T0.DocDate <= '[%1]')
    on clicking execute its showing error message invalid column
    name 'TDSAmt'.
    With regards,
    Jeyakanthan

  • How to get resultset from viewobject

    is there a way to java.sql.ResultSet from ViewObject , i am using Jdev 10.1.3.4 with ADFBC
    Thanks

    I guess the answer is no.
    May I ask why you need a java.sql.ResultSet?
    Timo

  • How to get thr number of rows of an SQL query in JSTL

    hi guys,
    can anyone please tell me how do i perform a function which finds out the particular rownumber of an sql query in JSTL.....
    the same code in jsp is:
    <% plateRSet.getRowNum() %>
    how do i do this given plateRset is the var for a given iteration
    thanks
    rahul

    make your result set scrollable...Not such a good idea. With Oracle, the JDBC driver will read and cache all the ResultSet in memory (with other DBMSs/drivers the behavior will probably be different, but you will still have some unnecessary overhead).
    You can do the caching yourself if you think it's worth it. If the piece of code you posted is why you need this for, then use a List or Vector and you won't need to know the size upfront.
    Alin,
    The jTDS Project.

  • How to get data from URL in a PL/SQL procedure

    Hi!<br>
    <br>
    I want to pass values in APEX from a report with a link to a PL/SQL procedure through URL.
    How can I make this?<br>
    <br>
    For example:<br>
    <br>
    I have a report:<br>
    <br>
    select<br>
       id,<br>
       name,<br>
       akt,<br>
       case<br>
          when akt is NULL then '< a href="f?p=&APP_ID.:27:&SESSION.:START_PROCESS" name="test_link" >set< /a >'<br>
       end choice<br>
    from<br>
       USERS;<br>
    <br>
    I want to pass the value "id" in the link ( named "test_link" ) . And want to use this value in a process like this:<br>
    <br>
    DECLARE<br>
       v_user_id NUMBER(10);<br>
    BEGIN<br>
       --I want to read this value from the url<br>
       if :REQUEST='START_PROCESS' then<br>
          v_user_id := ????;<br>
          <br>
          ...<br>
       end if;<br>
    END;<br>
    <br>
    <br>
    Thanks!<br>
    Marton

    Hi,
    1- Create a hidden item P27_USER_ID on page 27
    2- Change your code :
    SELECT ID, NAME, akt,
           CASE
              WHEN akt IS NULL
                 THEN    '< a href="f?p=&APP_ID.:27:&SESSION.:START_PROCESS:NO::P27_USER_ID:'
                      || ID
                      || '" name="test_link" >set< /a >'
           -- refer to f?p=App:Page:Session:Request:Debug:ClearCache:itemNames:itemValues:PrinterFriendly
           END choice
      FROM users;
       And then
    DECLARE
       v_user_id   NUMBER (10);
    BEGIN
       --I want to read this value from the url
       IF :request = 'START_PROCESS'
       THEN
          v_user_id := :p27_user_id;
           --your code
       END IF;
    END;Hope this helps,
    Grégory

  • How to get CLOB from stored procedure via StoredProcedureCall

    hi all
    I got "sp" on server : procedure get_text(p_in in varchar2, o_list out clob);
    in code:
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("get_text");
    call.addNamedArgumentValue("p_in", new String("MyList"));
    call.addNamedOutputArgument("o_list"); // <- out CLOB
    Vector v = (Vector)this.m_UnitOfWorkt.executeSelectingCall( call ); // <- here I got error
    but if o_list is varchar is all ok
    so how to get data from clob?
    Please help
    Regards
    Krzysztof

    Post Author: achaithanya
    CA Forum: Data Connectivity and SQL
    I'm connecting to database through stored procedure only.We have sybase installed on our local system so that we are given permissions only to access the stored procedures.When u see the fields in CR XI i.e Field explorer you are able to see only 1st result fileds.I connected to sybase and there i'm able to see the output of 1st & 2nd Result set.
    Regards,
    Chaithanya.

  • How to get hostname from targetlist in custom deployment procedure?

    When I make a simple procedure with a phase that will loop through a procedure hostname list
    and a hostcmd or directive inside that will use the hostname ex change a configuration file. How to get hostname from the hostname targetlist?
    I would rather not use $(hostname) or similar function if I can get the hostname from the target list.
    Edited by: user476601 on 2012-09-06 05:59

    I have tried that and cannot get it to work.
    I have tried to make a procedure with:
    parameter
    - parallel fase
    - step directive with hostname parm based on simple sh script (echo $hostname)
    - map hostname setvalue %TargetName%
    In a hostcmd step you cannot access %TargetName% directly
    it doesn't work. Please come with an example if you have tried it.
    /René

  • How to get data from three tables (A,B,C) having one to many relation between A and B .and having one to many reation between b and c

    i have  three tables A,B,C.  there is one to many relation between A and B. and one to many relation existed between table b and c . how will get data from these three tables

    check if this helps:
    select * --you can always frame your column set
    from tableA a
    left join tableB b on a.aid=b.aid
    left join tableC c on c.bid=b.bid
    This is just a general query. However, we can help you a lot more, if you can post the DDL + sample data and required output.
    Thanks,
    Jay
    <If the post was helpful mark as 'Helpful' and if the post answered your query, mark as 'Answered'>

  • How to get BOOLEAN from STORED FUNCTION

    We are calling legacy PLSQL stored procedures and functions via named queries. This has worked fine so far, but there are some functions which return the type 'BOOLEAN'. e.g.
    FUNCTION some_function( some_argument IN NUMBER) RETURN BOOLEAN;
    Where the return type is BOOLEAN calling the named query fails with
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink - 10g Release 3 (10.1.3.0.0) (Build 060118)): oracle.toplink.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: ORA-06550: line 1, column 13:
    PLS-00382: expression is of wrong type
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    Error Code: 6550
    A couple of threads have hinted that what we are trying to do is not possible:
    How to get BOOLEAN from STORED PROCEDURES
    Re: Creating Named Query: from OracleCallableStatement
    This would possibly be due to 'restriction in the OCI layer'. Can anyone help? Is there really now way to call a valid PLSQL stored function via a named query when the return type is BOOLEAN?
    thanks

    I can't comment on possible issues you might have with the driver, but if it can be done in JDBC, it should be possible in TopLink.
    TopLink has the StoredFunctionCall which extends the StoredProcedureCall but adds an unnamed ouput parameter in the first spot of its parameter list. You will need to get the databasefield and set its type to BOOLEAN ie:
      DatabaseField returnField = (DatabaseField)yourStoredFunctionCall.getParameters().firstElement();
            returnField.setName(name);
            returnField.setSqlType(Type.BOOLEAN);Be sure not to use the setType() method, as I believe TopLink will try to use the Type.BIT when a boolean class is used as the classtype.
    Best Regards,
    Chris

  • Getting resultset from some other java program

    how could i getting resultset from some other java program?
    plz

    a resultset is directly linked to your (prepared) query.
    for performance(and synchronization) reasons, you do want to retrieve the data as fast as possible and then release it.

  • HT4623 how to get app from itunes

    HOW TO GET GAMES FROM ITUNES,

    Find app in the app store.
    Buy app from the app store.
    Are you having an issue with the process?  What is that issue?
    Please turn off your caps lock and explain your issue

  • How to get the store procedure name inside this store procedure?

    how to get the store procedure name inside this store procedure?

    Why cant you get the procedure name as hard code as the proc name is going to change.
    Are you looking for getting the parent proc name from child proc name which is getting executed within parent proc?
    Try the below:
    --Parent Proc
    Alter Proc sp_test
    as
    Begin
    Declare @s varbinary(MAX) = Cast('sp_test' as Varbinary(MAX));
    SET CONTEXT_INFO @s;
    exec sp_test2
    End
    --Child proc
    Alter proc sp_test2
    as
    SELECT Cast(CONTEXT_INFO() as varchar(100));
    --Test execution
    Exec sp_test
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped.
     [Blog]

  • How to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    how to get photos from mac to iPhone 6? when i try it just comes up iCloud instead of my photos

    Make sure Settings > iCloud > Photos > iCloud Photo Library (Beta) = "Off"
    Then sync your iPhone using iTunes and make sure your sync settings for photos are set correctly in iTunes.

  • I got a new computer and don't know how to get music from ipod touch to itunes library

    I recently got a new computer and don't know how to get music from my ipod touch to show on my itunes library. 

    You need to transfer the iTunes folder from the old computer to the new one.
    iTunes: How to move your music to a new computer (Mac or Windows):
      http://support.apple.com/kb/HT4527

Maybe you are looking for

  • Facebook doesn't work with Firefox 28.0 + Flashplayer 12,0,0,77

    Hey everybody, first of all let me tell you the specs of my system: Laptop: Windows 7 Home Premium  64 bit Acer Aspire 7745G Laptop Intel i7 Q720 @1,6 GHz 4,00 GB RAM Browser: Mozilla Firefox 28.0 Flash Player Version: 12,0,0,77 Problem: So the Flash

  • How to get the checked attribute of a checkbox item from a PL/SQL process?

    Hello, I have a simple static form with one checkbox linked to a LOV containing one single value. I use this checkbox just to enable/disable other fields via Javascript. I am interested to fetch the "checked" attribute of this checkbox (and not the v

  • Items In Use for File Transfers

    Whenever I transfer several files at a time (7+ or so), I get the error "The operation cannot be complete because the item "(insert filename here)" is in use." I have tried the lsof command in Terminal with no results. This happens with different fil

  • Transmitting start/stop/play messages to external instruments

    How do I get Logic to transmit start/stop/play messages to my external Roland groovebox? I've tried ticking the "Transmit MMC" in the Synchronization settings but it doesn't seem to work. Basically what I'm trying to achieve is when I hit play on the

  • Production Report with batch number

    Dear Experts, I don't know how to include the batch number for the finished goods in the following query , SELECT T0.[DocNum] as Prod#, T0.[ItemCode],T0.[CmpltQty], T1.[ItemCode], T1.[IssuedQty], T2.[BatchNum],T0.[Comments] as Remark FROM OWOR T0  IN