Can we print the data from types or return it to java ?

Hello,
The requirement is very clear that, their is a huge amount of data (80 lacs Rows Approx.) these rows are need to be showed in the front-end which is java. First the java team had written a simple select statement in the java codeing which was taking a quite a large time (10 - 20 min approx.), then i shifted this part to back-end i,e ORACLE 11g & wrote the plsql block below which consist of types.
Now i have managed to bring the data in types but how to print that data ??? is their any member function ???  How should i return this data to java code ???
ORACLE DATABASE 11g
Eclips Java
Linux Enterprice Edition 5
create or replace procedure date_time(v_fromtime in timestamp,v_totime in timestamp) is
type v_date_time is table of varchar2(4000);--T_MES_DSS_BLOCK_DATA_13.Date_Time%type;
datetime_tab v_date_time:=v_date_time();
type v_counter is table of T_MES_DSS_BLOCK_DATA_13.Counter%type;
counter_tab v_counter:=v_counter();
type v_column_1 is table of number;
column1_tab v_column_1:=v_column_1();
type v_column_2 is table of number;
column2_tab v_column_2:=v_column_2();
cursor dt is
select DATE_TIME, COUNTER,COLUMN_1, COLUMN_2
from (
select
/*+  INDEX(T_MES_DSS_BLOCK_DATA_13 IDX_MES_BLK_DATA_3_DATE_TIME) INDEX(T_MES_DSS_BLOCK_DATA_13 IDX_MES_BLK_DATA_3_COUNTER)*/
DATE_TIME, COUNTER,
dbms_xdbutil_int.rawtonum(SUBSTR(BLOCK_COLUMN_23, 121, 8))COLUMN_1,
dbms_xdbutil_int.rawtonum(LAG( (SUBSTR(BLOCK_COLUMN_23, 121, 8)),1,0 ) OVER (ORDER BY DATE_TIME ))COLUMN_2 
from T_MES_DSS_BLOCK_DATA_13 PARTITION(PART11JUN2010) 
where DATE_TIME BETWEEN v_fromtime and v_totime);
end_time number;
start_time number;
begin
start_time:=dbms_utility.get_time();
open dt;
loop
fetch dt bulk collect into datetime_tab,counter_tab,column1_tab,column2_tab;
exit when dt%notfound;
end loop;
close dt;
dbms_output.put_line('Number of Rows in Date_time:- ('||datetime_tab.count||'):');
dbms_output.put_line('Number of Rows in Counter:- ('||counter_tab.count||'):');
dbms_output.put_line('Number of Rows in column1:- ('||column1_tab.count||'):');
dbms_output.put_line('Number of Rows in column2:- ('||column2_tab.count||'):');
end_time:=dbms_utility.get_time();
dbms_output.put_line('Total Time:-'||to_char(end_time-start_time)/60);
end date_time;

Well anyhow i have managed to run this code using bulk collect feature & getting good performance but can i print this data ???
how to return this data which has bulk collect feature to java code ??? any idea ?
CREATE OR REPLACE PROCEDURE "MES01"."DATE_TIME"(v_fromtime in timestamp,v_totime in timestamp,
datetime_tab out t_mes_dss_block_data_13.date_time%type,
counter_tab out t_mes_dss_block_data_13.counter%type,
column1_tab out number,
column2_tab out number) is
cursor dt is
select DATE_TIME, COUNTER,COLUMN_1, COLUMN_2,rownum
from (
select  /*+  INDEX(T_MES_DSS_BLOCK_DATA_1 IDX_MES_BLK_DATA_1_DATE_TIME) INDEX(T_MES_DSS_BLOCK_DATA_1 IDX_MES_BLK_DATA_1_COUNTER)*/
DATE_TIME, COUNTER,
dbms_xdbutil_int.rawtonum(SUBSTR(BLOCK_COLUMN_1, 1, 4))COLUMN_1,
dbms_xdbutil_int.rawtonum(LAG( (SUBSTR(BLOCK_COLUMN_1, 1, 4)),1,0 )   OVER (ORDER BY DATE_TIME ))COLUMN_2 
from T_MES_DSS_BLOCK_DATA_1 PARTITION(PART03AUG2010) 
where DATE_TIME BETWEEN '02-AUG-2010 09:00:00.0' and '02-AUG-2010 09:10:00.0')  
where COLUMN_1 =0 and COLUMN_2 != 0 or (rownum=1 and COLUMN_1 = 0 and COLUMN_2 = 0);
--end_time number;
--start_time number;
begin --1st block
Declare --2nd declare
type v_date_time is table of T_MES_DSS_BLOCK_DATA_3.DATE_TIME%type;
datetime_tab v_date_time:=v_date_time();
type v_counter is table of T_MES_DSS_BLOCK_DATA_3.Counter%type;
counter_tab v_counter:=v_counter();
type v_column_1 is table of number;
column1_tab v_column_1:=v_column_1();
type v_column_2 is table of number;
column2_tab v_column_2:=v_column_2();
type v_rownum is table of number;
rownum_tab v_rownum:=v_rownum();
Begin --2nd block
--start_time:=dbms_utility.get_time();
open dt;
loop
fetch dt bulk collect into datetime_tab,counter_tab,column1_tab,column2_tab,rownum_tab;
exit when dt%notfound;
end loop;
close dt;
--dbms_output.put_line('Number of Rows in Date_time:- ('||datetime_tab.count||'):');
--dbms_output.put_line('Number of Rows in Counter:- ('||counter_tab.count||'):');
--dbms_output.put_line('Number of Rows in column1:- ('||column1_tab.count||'):');
--dbms_output.put_line('Number of Rows in column2:- ('||column2_tab.count||'):');
--end_time:=dbms_utility.get_time();
--dbms_output.put_line('Total Time:-'||to_char(end_time-start_time)/60);
end; -- 2nd block
end date_time; -- 1st block

Similar Messages

  • How can I print the date and time in a photo from iPhoto

    How can I print the date and time in a photo from iPhoto

    You want to print them on their own? Can't be done. WIth the photo? Install this
    http://www.iborderfx.com/iborderfx/

  • How can we export the data from OAF Page to Excel instead of .csv or .txt

    Hello,
    How can we export the data from OAF Page to Excel instead of .csv or .txt
    When i click on the export button it is exporting to txt file, But i need to export the data into Excel by default
    Please help me
    Thanks in advance
    Thanks,
    Raju
    We have changed the below profile option to get the data in excel by default
    Profile Name Export MIME type
    Profile Code FND_EXPORT_MIME_TYPE+
    Existing Value: text/tab-separated-values+
    Change as: Excel
    Thank you,
    Raju
    Edited by: 1006649 on May 21, 2013 10:55 AM

    We have changed the below profile option to get the data in excel by default
    Profile Name Export MIME type
    Profile Code FND_EXPORT_MIME_TYPE+
    Existing Value: text/tab-separated-values+
    Change as: Excel
    Thank you,
    Raju

  • How can I extract the data from Xstring .

    Hi Gurus ,
    How can I extract the data from a XSTRING  .
    I have to get the data which is filled in the survey form the data is getting saved in form of xstring .
    Someone told me that there is a standard FM for that . but I am not able to find .
    Please reply with the FM in case some one knows about it .
    Thanks in advance .

    The following code works as of 7.0 (in any SAP system):
    FORM XSTRING_TO_STRING USING input TYPE xstring CHANGING output TYPE string.
    TYPES : BEGIN OF ty_struc,
              line TYPE c LENGTH 100,
            END OF ty_struc.
    DATA lt_char TYPE TABLE OF ty_struc.
    DATA length TYPE i.
    length = xstrlen( input ) / cl_abap_char_utilities=>charsize.
    CALL FUNCTION 'SCMS_XSTRING_TO_BINARY'
      EXPORTING
        buffer                = input
      tables
        binary_tab            = lt_char.
    CONCATENATE LINES OF lt_char INTO output RESPECTING BLANKS.
    output = output(length).
    ENDFORM.
    Edited by: Sandra Rossi on Mar 30, 2010 12:24 AM

  • How can i Pick the data from the string

    Hi Gurus
    How can i Pick the data from the string using regular expressions. for ex:
    1) 10000-san0001
    2) 3000000-rani0001
    3) 30-super003
    its doesnt mainain how many characters.
    like this i got string. now i only want  after the symobl( -) text (san
                                                                                    rani
                                                                                    super)  .how can i pick that
    can anyone provide me regular expressions.
    Thanks & Regards
    Sandya
    Edited by: sandya rani on Jan 29, 2010 2:51 PM

    REPORT  ZTEST.
    data: str1 TYPE string,
    str2 TYPE string,
    str3 TYPE string,
    lenth TYPE string,
    str4 TYPE string,
    temp type i value '0'.
    data: ii type i value '0',
          jj type i value '1'.
    Data : begin of itab OCCURS 0,
    l_string type string,
    end of itab.
    itab-l_string = '3000000-GUNDALA20001'.
    append itab.
    clear itab.
    itab-l_string = '2045677-iCVj1001'.
    append itab.
    clear itab.
    itab-l_string = '3000-ragh30001'.
    append itab.
    clear itab.
    loop at itab.
      MOVE 0 TO ii.
      MOVE 1 TO jj.
      SPLIT itab-l_string AT '-' INTO: str1 str2 .
      clear: itab-l_string,str1.
      lenth = strlen( str2 ).
      while temp < lenth.
        str4 = str2+ii(jj).
        if str4 CA 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' or str4 CA 'abcdefghijklmnopqrstuvwxyz'.
          if sy-subrc = 0.
            CONCATENATE str3 str4 into str3.
          endif.
          ii = ii + 1.
        ENDIF.
        temp = temp + 1.
      ENDWHILE.
      write: / str3.
      clear: itab, ii, jj,str1, str2, str3, str4,temp, lenth.
    Endloop.

  • Can we retrive the data from Maintainence view

    Hi Guys,
    Can we retrive the data from Maintainence view...
    Thanks,
    Gourisankar.

    Hi,
    Data can be retrived only from following type of views:
    Projection view
    Database View

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

  • Unfortunately, I lost by an update all the apps on my iPad 2. Now I can not pull the data from the cloud to my iPad. How is this possible?

    Unfortunately, I lost by an update all the apps on my iPad 2. Now I can not pull the data from the cloud to my iPad. How is this possible?

    If you just installed iCloud does that mean you updated the iOS that's running on your iPad?  If so, you'll want to restore all the programs you have from the backup you hopefully made.
    Refer to these articles for help.
    iTunes: Backing up, updating, and restoring iOS software.
    If you don't want to use iCloud, simply don't activate it.
    You can also download the programs again.
    If you live in a country that supports re-downloading apps then you can re-download them.  You can refer to this article for more help.
    Downloading past purchases from the App Store and iTunes Store
    What to know if your country supports downloading past purchases?
    iTunes in the Cloud Availability

  • How can I print the calendar from my iPad?

    How can I print the calendar from my iPad/iPhone 4?  I would like each month on a separate 8 1/2 x 11 sheet of paper.  Thanks!

    What print app do you have? I think that you need certain printing apps in order to print the iPad calendar. The print feature is not built into the app itself ...As far as I know.

  • How Can we get the data from Non-SAP to SAP in WebDynpro

    Hi,
    I hope u understand my query, How can we get the data from Non-SAP to SAP thru WebDynpro Programming.
    Help out with the steps for getting the data or procedure.
    Regards,
    Mutyapu

    You can expose the APIs in the Non-SAP backend as Web Services, and consume them in SAP by creating an Enterprise Proxy. Then these can be called just like normal class methods from Web Dynpro.
    Regards,
    Nithya

  • How can I acquire the data from 3 separate Channels of SCXI1300 simultaneously?

    I am trying to build a DAQ system, which can collect the data coming from 3 different channels. I am using the SCXI 1300 board, Labview 8.0. I used 3 separate DAQ Assistant module to build the system, but it can not collect the data from the 3 channels simultaneously, it can only collect the data from one channel by another channel. So I am wondering how could I fix this problem or rebuild my system.  Thanks

    Hi, Dennis
    I tried to use the NI-DAQmx to replace the DAQ Assistant to do the 3-channel data acquisition simultaneously, and I did the signal splition as you told me. The program works fine for 1-channel data collection, but if I chose 3 channels to do the data acquisition simultaneously, the program could not wokr, and  a warning window  kept poping up, and the window tells me the maximum sampling frequency is 0.952. So I am wondering what is going wrong and how to fix it.
    The attached files are the code and the screen shot of the warning window, please check them.
    Thanks
    Jingrui
    Attachments:
    NI-DAQmx program.vi ‏165 KB
    Warning Window.jpg ‏2305 KB

  • How can i convert the data from mutiple-table to the other database(MSSQL)?

    Dears,
    How can i convert the data from mutiple-table to the other database such as MS-SQL?
    I have a third party system based on MS-SQL 2000.
    Now we want to make a integration between SAP R/3(Oracle) and SQL server.
    When my user releases the purchase order in R/3, the application we coded will convert the releated data to the temp database on the SQL server.
    But i don't know which tools will help me reach the purpose.  BAPI, LSMW, IDoc... ???
    Would anybody tell me which way is better and how to do?
    Thanks a lot!
    Kevin Wang

    Hello Kevin,
    The question to use which method depend on your detail requirements. If you use BAPI, you need to find which Bapi can provide the data you want. Bapi normally use as a function called by external system. So you need to develop an external program like VB/Java to call this Bapi and move it to SQL. LSMW is use when you want to upload data from an external system to SAP. So it does not serve your requirement. Idoc can be use to export data to an external system. Again like Bapi, you need to find what Idoc can provide the data you want. However, it does not any programming from the external system. If I were you, based on your requirements, I think writing an Abap program that read the data you want and download it to NT/SQL server will be faster and easier.

  • How can i save the data from the Oracle database to my local directory

    How can i save the data from the Oracle database to my local directory instead Of saving the data file to the Directory created on the Oracle Server ?
    I require to design the Procedure which will pull the data from various tables and needs to store the data in the Client's local directory.

    Since SQL*PLUS runs on the client, you can use SQL*PLUS to spool data to your local drive.
    You could also use the database to write a a specified drive where all users have access to (mapped network drive, e.g.). I wouldn't recommend doing it that way, but it is sometimes useful when the files are created in some nightly batch run.

  • Can i recover the data from a broken XD card?

    Can i recover the data from a broken XD card? any software Power Data Recovery. but it failed

    Accidentally deleted data from XD card, don't panic. I suggest an advance and professional XD card recovery software, you can use third-party software Kernel for Digital Media Recovery Tool. It can quickly restore all lost data from XD card. This software
    also supports all kinds of multimedia files such as SD Card (Secure Digital), Multi Media Card (MMC), Compact Flash (CF), XD Card, Micro SD card, , Memory Stick. To more details kindly read this post : http://digitalmediarecovery.blogspot.com/2013/12/retrieve-lost-data-from-memory-card.html

  • How can i store the data from the list to MS-Access?

    Hi all,
    We all know that from alv it is possible to export data to Ms-excel or word or text file. Can anyone tell me how can i store the data from alv or reports to Ms-Access?
    Thanks in Advance,
    Abhijit

    Hi,
    If you want that without code, i suppose there is a option in MS-Access to import data from Excel, so you have to first export to excel and then import to Access.
    If you want to code it yourself then have a look at FM TABLE_EXPORT_TO_MSACCESS, as said in Exporting Data from R/3 to MS ACCESS
    You can also see the search results in SCN for [export data to MS-Access (45 Results)|https://www.sdn.sap.com/irj/sdn/advancedsearch?query=exportdatato+MS-Access&cat=sdn_all].
    Regards
    Karthik D

Maybe you are looking for

  • Photo problems using "copy selected albums only"

    No one seems to be able to help me at Apple to figure out why if I have PhotoShop Album 2.0 that I can't get the IPod to let me have the choice of "copy selected albums only". The only choice it allows is to copy all photos and I don't want to do tha

  • Saaj namespace problem

    Hi, I am trying to using saaj to create ebXML soap message. I have two problems: 1) I cannot change the prefix of the Envelope, Header etc. I would like SOAP instead of soapenv. 2) More importantly, it repeats the namespace uri on each element, which

  • Iphone 4 will not sync with cloud, just tells me it failed and try again for the past month

    my iphone 4 will not sync with teh cloud.  I tried deletaing the backup on the cloud adn starting a new one, I tried resetting cloud on my iphone adn still an error that jsut says it had an error and try again later for over a month now.  any suggest

  • CLoud computing workload trace log file

    Hi. i need a cloud system workload trace based on virtualization. in parallel workload archive (http://www.cs.huji.ac.il/labs/parallel/workload/) and in  grid workload archive (http://gwa.ewi.tudelft.nl/pmwiki/pmwiki.php?n=Main.Home) we have grids wo

  • Dynamic export query for archiver

    Is there a way to pass custom query at run time and call export_archive method. Thing is I do not want to do automatic replication but create batch files on need basis and manually trigger transfer. regards, deepak