Will HANA database table to insert a CLOB field , how to operate ?

Will HANA database table to insert a CLOB field , how to operate ?
Prior to this , I also see the related documentation : http://scn.sap.com/thread/3242930,
So I used the link : http://docs.oracle.com/javase/tutorial/jdbc/basics/blob.html elaborated way to perform the operation to insert CLOB
But practice tells me does not work, will be reported abnormal:"com.sap.db.jdbc.exceptions.jdbc40.SQLFeatureNotSupportedException: Method createClob() of ConnectionSapDB is not supported.".
I want to know is , HANA how to insert CLOB field ? In this first say thank you !

This is a problem with the driver. It is a known bug/issue.
You have to use the dbms_lob.write procedure and append data to the clob inside a loop.
i.e. do something like (pseudo-code)
while(file.not_end)
char[] buffer= file.read(start_pos,bytes_read);
dmbs_lob.write(buffer);
start_pos = start_pos+ bytes_read;
null

Similar Messages

  • Hi friends, I have a doubt in inserting a field to database table and inserting the same values in two different tables

    I have a mpp screen for a cd library management system (we are practicing on it).
    We have a main screen where a user should enter the enteries and while clicking a add button it should be inserted in a table, Here the problem rises the table name are ztransaction and zstatus.The fields in mpp are cdid,customerid,transaction id,date of issue and duedate.Now after entering all the values on clicking add button it should be inserted to database table ztransaction and the field cdid alone should be inserted both in ztransaction and zstatus.
    Thank you

    Hi Raghuram R G,
    Check for Primary key and foreign key in the Database table??? Because of this it was not inserting...check and confirm??
    Regds,
    Vijay SR

  • Issue creating a Database table with a decimal key field

    Hi guys!
    Can you try this?
    - Create a Database Table ZTEST via SE11 with just the client field and a decimal field (which has to be a key field)
    - Create a corresponding text table for ZTEST with SPRAS, and a TEXT field
    - Create the dialog maintance view and enter some random data through SM30 (5 or 6 rows)
    Then go to SE11, display table ZTEST and click contents to show the data you just entered.
    Is there anything strange? In my case there is, actually: Not all text fields are shown, nevertheless if i try to display the data through SM30 the data is shown correctly....
    I've tried this in several releases and is always the same.
    Do you know why this is?
    Thanks in advance.

    Thanks for the answer.
    Unfortunately, this is not the case, the tables are correctly linked.
    Please look at the following snapshot, the first one, corresponds to the SE11 of the original table, the second one is the SE11 of the text table, and finally the third one is the SM30 of the original table.
    [Snapshot|http://img100.imageshack.us/img100/5071/testkl.jpg]

  • Unicode issueAssigning database table data to a string field of a structure

    Hi All,
    This is piece of code where it is throwing the error in ERP 6.0 but this is working fine in SAP 4.6c.
    select * into datatab-data from catsdb
    where pernr IN select_pernr.
    datatab-pernr = datatab-data+3(8).
    datatab-tabname = 'CATSDB'.
    datatab-dtype = 'C'.
    where CATSDB is transparent table with 108 fields.
    and datatab is a structure of type ZHCLONE_DATATAB in a Function Module defined with 4 fields PERNR,DTYPE,TABNAME,DATA.
    data is a charater field of length 4999.
    Error:CATSDB and DATATAB-DATA are not mutually convertable in unicode conversion.
    Any pointers to this would be highly appreciated.
    Thanks in advance.
    Regards,
    Rizwana.
    Edited by: Rizwana Parveen on Jun 27, 2008 7:33 AM

    Hi,
    The Data in the table CATSDB cannot be copied directly into the field datatab-data if the catsdb contains any non-character type fields.
    1>First take a work area
    wa_catsdb like line of catsdb
    2>Select the data from catstab into the the workarea
    select * into wa_catstab from catsdb
    where pernr IN select_pernr.
    3>Now transform the workarea into the datatab-data variable
    If the catstab contains complete character fields we can use direct move statement,else we need to use following method
    class cl_abap_char_utilities definition load.
        CALL METHOD cl_abap_container_utilities=>read_container_c
      EXPORTING
        im_container               = wa_catstab
      IMPORTING
        ex_value           = datatab-data
      EXCEPTIONS
        illegal_parameter_type = 1
        OTHERS                 = 2.

  • Problem inserting a clob using bpel and database adapter

    We are having issues inserting a clob field into the database when the data is over 4000 characters. Anything under 4000 characters works fine.
    The error we are seeing is "Error while converting to a Java struct object. Unable to convert XSD element P_RESPONSE_ARRAY_ITEM whole user defined type is QC_CRCBT_PKG_RESPONSE_TYPE. Cause: java.lang.ClassCastException: oracle.sql.CLOB; nested exception is: ORABPEL-11802"
    We are using BPEL 10.1.3.3 and a database adapter. THE PL/SQL parameter decomposes to a clob type. Again, anything under 4000 characters works fine.
    Any ideas?

    This is likely due to Bug-6629539, which has just been identified and fixed in 11. You can request a one-off patch for this bug (i.e. a BLR off of the 10.1.3.3.0 release label).

  • Insert Records into database table.

    Hello Friends,
                         I am trying to insert set of records from an Internal table into Database table.
    INSERT SPFLI FROM TABLE ITAB ACCEPTING DUPLICATE KEYS.
    This is my statement. But It inserts only one record in to SPFLI table.
    Cheers
    Senthil

    Hi Sentil,
    USE THIS STATEMENT.
    MOVE-CORRESPONDING ITAB TO SPFLI.
    SPFLI-MANDT = SY-MANDT.
    MODIFY SPFLI.
    thy this....
    <b>reward if useful</b>
    regards,
    sunil kairam.

  • Fastest way to write out internal table to database table ?

    Hi friends,
    my question is, what is the fastest way to write about 1,5 mill. of rows from an internal table to a database table ?
    points will be awarded immediately,
    thanks for your help,
    clemens

    Hi Clemens,
    If you just want to write (INSERT) 1.5 million rows of an internal table into a database table, use:
    INSERT <table name> FROM TABLE <itab>.
    Transaction Log Size could be a problem, therefore writing in packages could help, but this depends on your row size, your database configuration and on the current changes to your database. May be it runs in one package, if the rows are small (few bytes) then one package will be the fastest but you'll not much faster than with reasonable packages (3-20 MBytes). On Oracle with rollback segments you will probably have no problems at 1.5 million rows.
    Best regards
    Ralph

  • Loading internal table to database table

    Hi all,
    I have created a ztable .also i created an internal table with the same structure as ztable.I have some data in internal table.how to load these data from internal table into database table.how thre insert statement will be.

    Hi,
             Check whether entries are there in the internal table. Also check for the structure.
    MODIFY dbtab FROM TABLE itab.
    UPDATE dbtab FROM TABLE itab.
    just read this.
    If you just want to write (INSERT) 1.5 million rows of an internal table into a database table, use:
    INSERT <table name> FROM TABLE <itab>.
    Transaction Log Size could be a problem, therefore writing in packages could help, but this depends on your row size, your database configuration and on the current changes to your database. May be it runs in one package, if the rows are small (few bytes) then one package will be the fastest but you'll not much faster than with reasonable packages (3-20 MBytes). On Oracle with rollback segments you will probably have no problems at 1.5 million rows.
    <b>Rewrad points</b>
    Regards

  • Text file storing in a database table

    I have a text file, that contains so many lines in it,..
    Now the problem is that.. I want to store my text file with the pl/sql code in a database table....
    plz suggest, how to create a table and how to store that text file in a database table.....

    The following code is tested and get the correct result (forms 10.1.2.0):
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    SQL> create table tclob  (col_lob clob);
    Table created.
    Declare
      file  TEXT_IO.FILE_TYPE;
      text  varchar2(10000);
      L$Clob CLOB;
    Begin
      -- prepare CLOB object --
      dbms_lob.createtemporary( L$Clob, TRUE ) ;
      -- open text file --
      file := TEXT_IO.FOPEN( 'c:\forms.css', 'R' ) ;
      If TEXT_IO.IS_OPEN( file) Then
        -- start reazding file --
         Begin
           Loop
             TEXT_IO.GET_LINE( file, text );
             -- add the line to the CLOB variable --
                dbms_lob.writeappend (L$Clob, length(text), text);
           End loop;
        Exception
          when no_data_found then
            -- end of text file --
            TEXT_IO.FCLOSE(file);
          when others then
           null;
        End ;
        -- store the CLOB in the database --
        --Update tclob Set col_lob = L$Clob ;
        insert into tclob (col_lob) values (L$Clob);
        forms_ddl('commit');
           dbms_lob.freetemporary( L$Clob ) ;
      End if ;
    exception
         when others then
         message(error_code || '-' || error_text);
    End;Francois

  • Reports- MODIFIYING DATABASE TABLE

    HI ALL,
    I have a requiremnt in which i have to add data into the database table <b>ZSTOCK1</b> which dosent contain any data . I have one report in which there are two radio buttons 1. YARN 2. CHEMICAL .  the output internal table is <b>it_totstk1 </b>i.e total stock. if i execute report taking one materail and the stock of total one month from 1.04.2006 to 30.04.2006 selecting one radio button( ex: yarn)  the output is showing but the stock of yarn only some fields doesnt have data which are related to chemical are shown zero. llly if i select CHEMICAL it displays data related to chemical and all the yarn related fields shows as zero.
    now i have requiement to update the Data base table <b>ZSTOCK1</b> based on the condition the values are coming in the internal table and also if i select YARN (radio button)  the fields related to chemical should be updated as blank only yarn related data should  be inserted in the database all the CHEMICAL related data should be inserted as blank  vice-versa.
    The data in the internal table is taken from P_file and the output of the internal table should be inserted in the database table. please tell me the logic how to do it for the 2 cases for radiobuttons 1. yarn and 2.chemical.
    Useful answers will be rewared.
    Thanx & Regards,
    K.Sunil Kumar.

    Hi Hemanth,
    I am not sure of the exact table name where the program source code are stored.
    But you can get the code by using the READ REPORT statement.
    Try the below code:
    DATA prog TYPE c LENGTH 30.
    DATA itab TYPE TABLE OF string.
    prog = 'YGBTEST06'.  "Put in your program name
    READ REPORT prog INTO itab.
    Reward points if helpful.
    Thanks,
    Balaji

  • Enqueue and Dequeue before updating Database table

    Hi all,
    We are updating database tables using INSERT, MODIFY and UPDATE statements. Since many people will be running the application at the same time we need to lock the table before updating database table. So we need to use ENQUEUE and DEQUEUE functionality for this purpose.
    Can any plz explain what are the steps we should follow now?
    Thanks in advance.

    Hi,
    Any Database access should carefully handled as multiple applications may be accessing the database at the same time. To read a record from the database you don't need to implement a lock, but to write you need not only locks but also ideally should use the Update Function Modules to comply SAP "All or Nothing" Principle. This will prevent data inconsistency of the database and the data will be proper state. You need to use the COMMIT WORK and ROLLBACK WORK in you code to handle the consistency part of the database.
    The best design approach would be seperate the Database Layer completely from the business layers. This will make your code robust and easy to maintain.
    As, for the Locking Concepts, you will get multiple resources from SDN as how to create Locks and implement the Locking modules in your code. But more than that what matters is why and how to implement the SAP Locking concepts to make your application run better.
    Have a look at the following link
    http://help.sap.com/saphelp_nw70/helpdata/en/cf/21eea5446011d189700000e8322d00/content.htm
    Hope this helps.
    Thanks,
    Samantak.

  • Duplicates in a database table

    Hi !
    I have a database table. It has 4 fields. 3 of them are key.
    Table (f1,f2,f3,f4)
    f1,f2,f3: key
    f4: numeric field.
    From a ABAP program, I can insert (using insert sentence) two records with the same key. why ???
    Then, if I try ....
    select f1 f2 f3 sum(f4)
    from table
    group by f1 f2 f3
    ... it doesn´t work. This sentence returns two records. Why ?
    (some fields of the key can be nulls)
    Thanks.

    HI,
    From a ABAP program, I can insert (using insert sentence) two records with the same key. why ???
    first of all It is not at all possible. There should be atleast one key value different for 2 data-row in database table. It is the fundamental concept of key. Your above statement holds for nonkey vaule or partial key field view/selection only.
    for next query,
    Instead of
    select f1 f2 f3 sum(f4)
    from table
    group by f1 f2 f3........
    use
    select distinct f1 f2 f3 sum(f4)
    from table
    group by f1 f2 f3............
    Regards,
    Anirban

  • After creating a customizing database table 'create entries disable'

    After creating the database table i want to add fields through goto-table contents-create entries but "create entries" is in disable mode how can i resolve this?

    Dear Dileep,
    You need to go to "Delivey and Maintainence" tab there you will "Data Browser/Table Maintainence",
    Here you need to select "Display/Maintainence Allowed" in the drop down list.
    Thie will help to find the "create entrie enable".
    Thanks,
    Ananth.

  • ABOUT DATABASE TABLE

    CAN I CREATE A FIELD  IN DATABASE TABLE
    WITHOUT A DATA-ELEMENT
    CAN I CREATE A FIELD   IN DATABASE-TABLE WITHOUT A DOMAIN

    Hi,
    yes, you can and in this way:
    Trans. SE11 plus table name
    insert you new field
    press button "predefined type"
    now colums "data type" and "length" are active and column "data element" is inactive.
    you can enter hier your data type (CHAR, NUMC, DATS, etc.) and the length of the field.
    save and activate the table.

  • Using Tabstrip update the database table

    Hi Guy's,
    I created two screens(100 & 110).
    Click 1 pushbutton HRP1000 related information is displayed.
    Click 2 pushbutton it displays HRP1001 relatd information.
    worked to read the data from the Database tables and output displayed sucessfuly .   However i want to entered data in those fields wants to update to database table.
    Please friends help me how to work this senario.
    Thanks and Regards,
    Sai.

    Hi Guy's,
    To update the database records, wrote the logic in PAI
       WHEN 'SAVE'.
        INSERT HRP1001.
    INSERT INTO HRP1001  VALUES wa_P2.
    it displaying an error message " the work area wa_p2 is not long enough.
    and also i tried using it_p2
    it displaying an error message " you can't use internal table as work area".
    Please help me friends  it is very urgent.
    Thanks and Regards,
    Sai.

Maybe you are looking for

  • Enabling Google Analytics Mountain Lion Server

    Hi everyone, I just recently configured my first Mac server for a public school I'm working in. After setting up the Wiki server I was shocked there wasn't a way to enable Google Analytics, or any javascript for that matter. After a little poking aro

  • RMAN 11gr2 ORA-00308 when dulplicate database from active

    Hi, I'm trying to clone a production database (Oracle 11.2.0.3) from HP-UX IA64 to Solaris 10 (Sparc 64) (source on Filesystem, target on ASM) the previous steps was done (same oracle software installation, same patches, sqlnet comunication, etc.) bu

  • IIS Manager 6.0 Wait Operation Time Out on connecting to remote server

    I'm looking to configure SMTP on Server 2012 Core, I've installed the feature and remote management/administration tools and web management console and web management compatability. When I attempt to connect via IIS 6.0 Manager I immediately receive

  • OmniPortlet Not displaying

    Hi, I have setup PDKv2 July release on a Unix server, and I have configure my display setting. My web clipping is working fine, but my OmniPortlet is not displaying any information. I was trying to display data using the sample csv file and from SQL,

  • Please post unlock code for Album Starter 3

    Hi, I'm writing for my father who will be 70 tomorrow. The only gift he wants is to be able to retrieve the photos he unwittingly transferred to Adobe Album Starter 3. He didn't realize that it was a negative marketing scheme and is now caught in the