Insert concatenated data from Varchar2 to Clob

Hi,
I have a table with the following structure:
create table logmst (logno varchar2(10), log_detail1 varchar2(4000), log_detail2(4000));
I would like to concatenate the data from log_detail1 and log_Detail2 into a Clob datatype. So, i have created another table:
create table test(id varchar2(10), filedesc clob default empty_clob());
I tried:
insert into test (id, filedesc) select logno, to_clob(log_Detail1 || log_Detail2) from logmst;
System shows ORA-01489: result of string concatenation is too long.
Can somebody help? Thanks in advance.

You have to write a small procedure. You cannot achieve this using a SQL statment.
Declare
   myClob CLOB;
   logNo logMst.logNo%type;
   col1 logmst.log_detail1%type;
   col2 logmst.log_detail2%type;
   length_col1 number;
begin
    For rec in (select logNo, log_Detail1, log_Detail2 from logMst)
    loop
              logNo := rec.LogNo;
              col1 := rec.Log_Detail1;
              col2 := rec.Log_Detail2;
                 myClob := empty_clob();
                dbms_lob.createtemporary(myClob, TRUE);
                length_col1 := length(col1);
                dbms_lob.write(myClob , length_col1,1,col1);
                dbms_lob.write(myClob , length(col2), length_col1+1,col1);
               -- Write here SQL statemnt to write this CLOB to your table...
    end loop;
end;Thanks,
Dharmesh Patel

Similar Messages

  • How to insert the data from XML to a table

    Hi,
    I'm using Oracle 10g Express Edition
    I need help in How to insert the data from XML file into the table.
    Below is the example i'm working on..
    I have create ridb user with below mentioned privileges:
    Account Status Locked Unlocked
    Default Tablespace: USERS
    Temporary Tablespace: TEMP
    User Privileges :
    Roles:
    CONNECT
    RESOURCE
    Direct Grant System Privileges:
    CREATE DATABASE LINK
    CREATE MATERIALIZED VIEW
    CREATE PROCEDURE
    CREATE PUBLIC SYNONYM
    CREATE ROLE
    CREATE SEQUENCE
    CREATE SYNONYM
    CREATE TABLE
    CREATE TRIGGER
    CREATE TYPE
    CREATE VIEW
    & table is created TRIALZIPCODES below mentioned is the DDL:
    CREATE TABLE TRIALZIPCODES
    STATE_ABBR VARCHAR2(20) NOT NULL
    , ZIP_CODE NUMBER(10, 0) NOT NULL
    , ZIP_CODE_EXT VARCHAR2(20)
    Below is the XML FILE: which is stored in C:\OracleProject Folder
    File name: trial.xml
    <?xml version="1.0" ?>
    <metadata>
    - <Zipcodes>
    - <mappings Record="4">
    <STATE_ABBREVIATION>CA</STATE_ABBREVIATION>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    - <mappings Record="5">
    <STATE_ABBREVIATION>CO</STATE_ABBREVIATION>
    <ZIPCODE>80323</ZIPCODE>
    <ZIP_CODE_EXTN>9277</ZIP_CODE_EXTN>
    </mappings>
    </Zipcodes>
    </metadata>
    PL/SQL Procedure:which i'm trying to execute from SQLDeveloper
    create or replace
    PROCEDURE TRIAL AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    begin
    -- DBMS_XMLGEN.setRowTag ( ctx IN ctxHandle, rowTag IN VARCHAR2);
    -- DBMS_XMLGEN.setRowSetTag ( ctx IN ctxHandle, rowSetTag IN VARCHAR2);
    -- the name of the table as specified in our DTD
    DBMS_XMLGEN.SETROWSETTAG(l_context_handle,'zipcodes');
    -- the name of the data set as specified in our DTD
    DBMS_xmlgen.setRowTag(l_context_handle,'mappings');
    -- for getting the output on the screen
    dbms_output.enable(1000000);
    -- open the XML document in read only mode
    v_FileHandle := utl_file.fopen('c:/OracleProject','trial.xml', 'r');
    loop
    BEGIN
    utl_file.get_line(v_FileHandle, charString);
    exception
    when no_data_found then
    utl_file.fclose(v_FileHandle);
    exit;
    END;
    dbms_output.put_line(charString);
    if finalStr is not null then
    finalStr := finalStr || charString;
    else
    finalStr := charString;
    end if;
    end loop;
    -- for inserting the XML data into the table
    insCtx := DBMS_XMLSTORE.NEWCONTEXT('RIDB.TRIALZIPCODES');
    insCtx := DBMS_XMLSTORE.INSERTXML(insCtx, finalStr);
    dbms_output.put_line('INSERT DONE '||TO_CHAR(rowsp));
    DBMS_XMLStore.closeContext(insCtx);
    END;
    END TRIAL;
    For the first time when i complied i got the errors as :
    Procedure RIDB.PROCEDURE1@RIDB
    Error(16,14): PLS-00201: identifier 'UTL_FILE' must be declared
    Error(16,14): PL/SQL: Item ignored
    Error(29,1): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(29,1): PL/SQL: Statement ignored
    Error(33,1): PL/SQL: Statement ignored
    Error(33,19): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    Error(36,1): PL/SQL: Statement ignored
    Error(36,17): PLS-00320: the declaration of the type of this expression is incomplete or malformed
    So i logged in as sys & grant the permission to execute on UTL_FILE to ridb (user):
    SQL Statement:
    grant execute on utl_file to ridb
    So, it got compiled successfully but when i execute it gives me error as:
    Source does not have a runnable target.
    What does this mean?
    So I browse through forum & i got to know that i need to initial the UTL_FILE_DIR ="C:/OracleProject" in init.ora
    So can i edit the init.ora with notepad.When i tried to do that it says permission denied
    In my system it shows the init.ora file in path C:\oraclexe\app\oracle\product\10.2.0\server\config\scripts
    but there is also other file initXETemp in the same path do i need to do the changes in it.
    I have tried even editing the SPFILE as mentioned below:
    C:\oraclexe\app\oracle\product\10.2.0\server\dbs\SPFILEEXE - I had edit this file using notepad & set the value of UTL_FILE_DIR ="C:/OracleProject". So next time when i restarted i'm unable to log on to the database.
    So i had reinstall the software again.
    Could you please let me know how to proceed..

    hi,
    I have created the directory from sys database
    CREATE or replace DIRECTORY XML_DIR2 AS 'C:\OracleProject';
    & grant read,write access to the user
    grant read,write on directory XML_DIR2 to RIDB;
    & i had change the tag name in the xml file as shown below:
    <?xml version = '1.0'?>
    <metadata>
    <Zipcodes>
    <mappings Record="4">
    <STABBRE>CA</STABBRE>
    <ZIPCODE>94301</ZIPCODE>
    </mappings>
    <mappings Record="5">
    <STABBRE>CO</STABBRE>
    <ZIPCODE>80323</ZIPCODE>
    <ZIPCODEEXT>9277</ZIPCODEEXT>
    </mappings>
    </Zipcodes>
    </metadata>
    TRIALZIPCODE table as shown below:
    CREATE TABLE "RIDB"."TRIALZIPCODE"
    (     "STABBRE" VARCHAR2(20 BYTE),
         "ZIPCODE" NUMBER(*,6) NOT NULL ENABLE,
         "ZIPCODEEXT" NUMBER
    ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING
    STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645
    PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)
    TABLESPACE "USERS" ;
    I have tried two methods as shown below:
    Procedure 1:
    create or replace
    PROCEDURE TRIAL_V2 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    insCtx := DBMS_XMLStore.newContext('DEV.TRIALZIPCODES');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'STABBRE');
    DBMS_XMLStore.setUpdateColumn(insCtx, 'ZIPCODE');
    DBMS_XMLStore.setUpdatecolumn(insCtx, 'ZIPCODEEXT');
    DBMS_XMLStore.setRowTag(insCtx, 'mappings');
    cnt := DBMS_XMLStore.insertXML(insCtx, xmldoc);
    DBMS_XMLStore.closeContext(insCtx);
    END;
    Procedure 1 was compiled with out errors but when i execute i got the error as :
    Source does not have a runnable target.
    Procedure 2_
    CREATE OR REPLACE PROCEDURE TRIAL_V3 AS
    BEGIN
    DECLARE
    -- declare attributes
    charString varchar2(80);
    finalStr varchar2(4000) := null;
    rowsp integer;
    v_FileHandle UTL_FILE.FILE_TYPE;
    l_context_handle dbms_xmlgen.ctxHandle;
    insCtx DBMS_XMLStore.ctxType;
    cnt NUMBER;
    xmldoc xmltype := xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') );
    --XML_DIR VARCHAR2(40) := 'C:\\OracleProject';
    BEGIN
    INSERT INTO trialzipcode (STABBRE, ZIPCODE, ZIPCODEEXT)
    SELECT extractvalue(x.column_value, 'mappings/STABBRE'),
    extractvalue(x.column_value, 'mappings/ZIPCODE'),
    extractvalue(x.column_value, 'mappings/ZIPCODEEXT')
    FROM TABLE(
    XMLSequence(
    EXTRACT(
    xmltype( bfilename('XML_DIR2','trialxml.xml'), nls_charset_id('AL32UTF8') ),
    'metadata/Zipcodes/mappings'
    ) x
    END;
    END TRIAL_V3;
    Procedure 2 was complied without errors but when i execute i got the error as:
    Connecting to the database RIDB.
    ORA-22288: file or LOB operation FILEOPEN failed
    The system cannot find the file specified.
    ORA-06512: at "SYS.DBMS_LOB", line 523
    ORA-06512: at "SYS.XMLTYPE", line 287
    ORA-06512: at "RIDB.TRIAL_V3", line 12
    ORA-06512: at line 2
    Process exited.
    Disconnecting from the database RIDB.
    Could you please let me know how to proceed...

  • Change Parameter from VarChar2 to CLOB

    Hi,
    I have a function csvToArray which takes a csv string and converts it to an array.
    PROCEDURE csvToArray(p_csvString IN VarChar2,
    p_count OUT PLS_INTEGER,
    p_array OUT ARRAY_T) IS...
    Unfortunately the size of the csvString being passed in exceeds 32K, so I was thinking about changing the type of the csvString from Varchar2 to CLOB,i.e
    PROCEDURE csvToArray(p_csvString IN CLOB,
    p_count OUT PLS_INTEGER,
    p_array OUT ARRAY_T) IS...
    The procedure only uses the string functions instr and substr to find the elements of the csv string to place in an array.
    I've tested the change and it works, but is there anything I should consider with the change to the data type, or will the above always work fine? The extreme max size of p_csvString would be around 150K.
    Database version is 10.2.0.4.0
    Thanks

    Hi,
    This test maybe helpful
    Passed Length 65K test
    create or replace procedure my_pro ( pclob clob)
    is
    begin
      dbms_output.put_line('clob passed LEN:' ||
       dbms_lob.getlength(pclob) );
    end;
    Procedure created.
    SQL> exec my_pro( to_clob(lpad('x',32767,'c')||lpad('x',32767,'c')||'x'));
    clob passed LEN:65535
    PL/SQL procedure successfully completed.SS

  • Insert master data from SEM to BW

    Hi There,
    I wonder if anyone know, how in a standard way if it is possibile to insert master data from SEM to BW.
    I am referring in particular to the masterdata of the 0VENDOR. In fact the customer want to input the 0VENDOR Master data directly from SEM to BW.
    Many thank in advance.
    Antonino

    If you are talking about SEM-BCS in particular there is a special topic about Master Data Syncronization.
    Take a look in service.sap.com/sem under Media Library: there you find two docs about (1 ppt and a doc).
    See even OSS Notes:
    - 578348 FIN master data: Syncronization local system with BW
    - 676337 FinBasis: Leading fiscal year variant
    - 689229 FinBasis: Reports for the manual synchronization
    Hope it helps
    GFV

  • What's the exact trigger for when updating/inserting/deleting data from one DB to another DB which contains same info?

    Hi guys,
    I have created a copy of the AdventureWorks2012 DB called AdventureWorks2012_new on the same instance.
    I have created the following trigger below but my friend who is a DBA told me that this is not correct and I should be using the inserted table when creating this trigger. I would like AdventureWorks2012_new DB to be updating/inserting/deleting data from
    the same tables that have been updated/inserted/deleted in the AdventureWorks2012 DB. How exactly should I do this for all the tables in the whole database ? What I have written below is just for one of the tables, is there a quicker way to do it for all tables
    in this DB so that it performs the actions mentioned above, automatically ? Help would be greatly appreciated so I can understand how this works, thanks
    CREATE TRIGGER [HumanResources].[tr_HumanResources_AfterUpdate]
    ON [AdventureWorks2012].[HumanResources].[Department]
    AFTER UPDATE
    AS
    BEGIN
    SET NOCOUNT ON;
    UPDATE AdventureWorks2012_new.HumanResources.Department
    SET Name = t2.Name,
    GroupName = t2.GroupName,
    ModifiedDate = t2.ModifiedDate
    FROM AdventureWorks2012.HumanResources.Department AS t2
    INNER JOIN AdventureWorks2012_new.HumanResources.Department AS t1
    ON t2.DepartmentID = t1.DepartmentID
    END

    For insert it's easy:
    CREATE TRIGGER [HumanResources].[tr_HumanResources_AfterInsert]
    ON [AdventureWorks2012].[HumanResources].[Department]
    AFTER INSERT
    AS
    BEGIN
    SET NOCOUNT ON;
    Insert INTO AdventureWorks2012_new.HumanResources.Department
    (DepartmentID, Name, GroupName, ModifiedDate)
    SELECT DepartmentID, Name, GroupName, ModifiedDate
    FROM Inserted;
    END
    I didn't verify column names, so you may need to make sure to use correct column names for that table.
    Setting replication is a bit advanced topic although BOL is clear and you may start here
    http://technet.microsoft.com/en-us/library/ms151198.aspx
    If it will be complicated for you, you can ask extra questions in the MSDN Replication forum.
    For every expert, there is an equal and opposite expert. - Becker's Law
    My blog
    My TechNet articles

  • Get the list of table's last Inserted/Updated date from a database

    Hi All,
    Good afternoon!
    Please help me to find the last inserted/updated date from different tables in a database.
    Consider I have a database called testDB, which contains 20 tables. Most of these tables will get data inserted/updated daily. But sometimes it may not happen due to some issues . We will not be knowing about this issue until we check  in each table
    manually. Now, somebody should be daily checking for the issues in this db. So, we have decided to make an alert mail to send this informations to us.
    We need to check whether any of the table's in TetsDB has got inserted/updated data in one day difference.
    I have tried this..
    SELECT OBJECT_NAME(OBJECT_ID) AS Object_, last_user_update,*
    FROM sys.dm_db_index_usage_stats
    WHERE database_id = DB_ID( 'TestDB')
    Thanks,
    Julie

    The solution depends on the version and edition of your SQL Server.
    If you use SQL Server 2000 or SQL Server 2005, please visit these links: 
    How do I audit changes to SQL Server data?
    Table Auditing with SQL Server 2000
    If your SQL Server 2008 or above (only on the Enterprise edition), please have a look at this link:
    Change Data Capture
    If your SQL Server 2008 or above (all editions),
    you can use Change Tracking, but Change tracking captures the fact that rows in a table were changed, but does not capture the data that was changed.
    more info: 
    Comparing Change Data Capture and Change Tracking
    Saeid Hasani [sqldevelop]
    HI,
    I've read about change tracking change data capturing now. 
    We need to track the data daily and we need to know whether any modification happens in those tables.
    Will it make any performance issue if I enable change data capturing on multiple tables.. lets say 20+ tables.?

  • INSERT XML data from CLOB

    Hi Guys,
    I wonder if you can help me out , I m trying to insert a XML stored in a CLOB column as an XMLTYPE.. the example at eh end works but when i add in the sSELCT statement I get eh following error...
    INSERT INTO tmp_xml_table VALUES
    (11, 'select data from tmp_requests where id = 159');
    SQL Error: ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00210: expected '<' instead of 's'
    Error at line 1
    31011. 00000 - "XML parsing failed"
    *Cause:    XML parser returned an error while trying to parse the document.
    *Action:   Check if the document to be parsed is valid.
    DESC tmp_xml_table
    Name Null Type
    ID NUMBER
    DATA XMLTYPE()
    this bit works....
    INSERT INTO myTable VALUES (1, SYS.XMLType.CreateXML(
    '<?xml version="1.0"?>
    <fall>
    <name>myTable</name>
    <county>USA</county>
    <state>MI</state>
    <url>
    http://your.com
    </url>
    </fall>'));

    You are trying to insert the literal string 'select data from tmp_requests where id = 159', which is not valid XML.
    Try:
    insert into tmp_xml_table
    select 11, data from tmp_requests where id=159;

  • How to  insert  300 data from associative array to backend table in PL/SQL

    HI ALL,
    I'm posting my code here:
    Creating back end table:
    Create table orlando
    ( id number(20),
    calltype number(12),
         gateway_name varchar2(25),
         accounting_id varchar2(18),
         start_time_system_ticks number(11),
         node_time_zone      varchar2(25),
         start_date varchar2(10),     
         start_time varchar2(10),
         softswitch_response number(11),
         alerting number(11)     
    Creating package:
    CREATE OR REPLACE PACKAGE r IS
    type apollo_rec is record(
    id number(20),
    calltype number(12),
         gateway_name varchar2(25),
         accounting_id varchar2(18),
         start_time_system_ticks number(11),
         node_time_zone      varchar2(25),
         start_date varchar2(10),     
         start_time varchar2(10),
         softswitch_response number(11),
         alerting number(11)
    TYPE bin_array IS TABLE OF apollo_rec INDEX BY BINARY_INTEGER;
    PROCEDURE rr (state_array bin_array);
    END ;
    SET SERVEROUT ON
    CREATE OR REPLACE PACKAGE BODY r IS
    PROCEDURE rr (state_array bin_array) IS
    BEGIN
    FOR i IN 1 .. state_array.COUNT LOOP
    INSERT INTO orlando(id,calltype,gateway_name,accounting_id,start_time_system_ticks)VALUES(state_array(i).id,state_array(i).calltype,state_array(i).gateway_name,
    state_array(i).accounting_id,state_array(i).start_time_system_ticks);
    COMMIT;
    END LOOP;
    END ;
    END ;
    I've run this code in i*SQL PLUS.But when I run this code for 5 entries there is no error but when I modify the insert statement for 300 entries(300 identifiers in the insert statement)
    it gives me error:
    Warning: Package Body created with compilation errors.
    Errors for PACKAGE BODY R:
    LINE/COL      ERROR
    7/2      PL/SQL: SQL Statement ignored
    7/14      PL/SQL: ORA-00913: too many values
    Is there any feature in PL/SQL to decrease the entries in insert statement and make the insert statement along with the program small and increase the program performance.
    Edited by: 983040 on Jan 20, 2013 11:11 PM

    Basic example (ran on 11.2.0.3):
    SQL> create table testtab( id number, day date, val varchar2(30) );
    Table created.
    SQL>
    SQL> create or replace package TestTabLib as
      2 
      3          type TTestTab is table of testtab%rowtype;
      4 
      5          procedure InsertRows( rowArray TTestTab );
      6 
      7  end;
      8  /
    Package created.
    SQL>
    SQL> create or replace package body TestTabLib as
      2 
      3          procedure InsertRows( rowArray TTestTab ) is
      4          begin
      5                  forall i in 1..rowArray.Count
      6                          insert into testtab values rowArray(i);
      7          end;
      8 
      9  end;
    10  /
    Package body created.
    SQL>
    SQL> declare
      2          rowArray        TestTabLib.TTestTab;
      3  begin
      4          --// populating the array - using a bulk fetch as
      5          --// an example
      6          select
      7                  object_id, created, object_name
      8                          bulk collect into
      9                  rowArray
    10          from    all_objects
    11          where   rownum < 11;
    12 
    13          --// bulk insert array
    14          TestTabLib.InsertRows( rowArray );
    15  end;
    16  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from testtab;
            ID DAY                 VAL
           100 2011/12/05 09:16:03 ORA$BASE
           116 2011/12/05 09:16:04 DUAL
           117 2011/12/05 09:16:04 DUAL
           280 2011/12/05 09:19:09 MAP_OBJECT
           365 2011/12/05 09:19:10 SYSTEM_PRIVILEGE_MAP
           367 2011/12/05 09:19:10 SYSTEM_PRIVILEGE_MAP
           368 2011/12/05 09:19:10 TABLE_PRIVILEGE_MAP
           370 2011/12/05 09:19:11 TABLE_PRIVILEGE_MAP
           371 2011/12/05 09:19:11 STMT_AUDIT_OPTION_MAP
           373 2011/12/05 09:19:11 STMT_AUDIT_OPTION_MAP
    10 rows selected.
    SQL>
    SQL> declare
      2          rowArray        TestTabLib.TTestTab;
      3  begin
      4          --// populating the array - using a custom build
      5          --// loop example such as a Java front-end will
      6          --// use reading data from user input form
      7          rowArray := new TestTabLib.TTestTab();
      8          rowArray.Extend(2);     --// user entered 2 values
      9          for i in 1..rowArray.Count loop
    10                  rowArray(i).id := i;
    11                  rowArray(i).day := trunc(sysdate);
    12                  rowArray(i).val := 'value '||to_char(i,'000');
    13          end loop;
    14 
    15          --// bulk insert array
    16          TestTabLib.InsertRows( rowArray );
    17  end;
    18  /
    PL/SQL procedure successfully completed.
    SQL>
    SQL> select * from testtab where val like 'value%';
            ID DAY                 VAL
             1 2013/01/21 00:00:00 value  001
             2 2013/01/21 00:00:00 value  002
    SQL>

  • Can not insert/update data from table which is created from view

    Hi all
    I'm using Oracle database 11g
    I've created table from view as the following command:
    Create table table_new as select * from View_Old
    I can insert/update data into table_new by command line.
    But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)
    Anybody tell me, what's happend? cause?
    Thankyou
    thiensu
    Edited by: user8248216 on May 5, 2011 8:54 PM
    Edited by: user8248216 on May 5, 2011 8:55 PM

    I can insert/update data into table_new by command line.
    But I can not Insert/update data of table_new by SI Oject Browser tool or Oracle SQL Developer tool .(read only)so what is wrong with the GUI tools & why posting to DATABASE forum when that works OK?

  • Not able insert ,query data from forms

    hi,
    I am not able to insert data or query data from forms(10g devsuite).getting error frm-40505,frm 40508 .i am able to insert and select record from sql plus.the block ihave created is control block .it is connected to the table using the properties.
    should i do anything to insert record.please help

    the block ihave created is control block .it is connected to the table using the properties.A Control Block, by definition, is a non-database block. This means the block is not directly connected to a table so you have to manually display data in the block and any DML you want to perform on data in this block you must do manually as well.
    There are four database objects you can base your database block on; 1) a Table, 2) a View, 3) From Clause Query (basically an In-line View), and 4) a database stored procedure. I recommend you use one of these four methods rather than manually display your data.
    Craig...

  • Insert /delete data from SAP Z table to Oracle table and opposite

    Hi,
    Can u help me write this FM from the SAP side?
    So, I have two tables ZTABLE in SAP and Oracle table ORAC.
    Let's put three columns in each of them, for example
    TEL1
    TEL2
    ADRESS
    NAME
    where TEL field is primary from ZTABLE to ORAC...
    (in FM there shoud be abap code for writing data in ZTABLE after we press some pushbutton made in sap screen painter..)
    for example, when we write new record in ZTABLE
    00
    112233
    Street 4
    Name1
    this data shoud be inserted in Oracle table ORAC.
    when we write new record in Oracle table for example
    01
    445566
    New Street
    Name2
    this data shoud be inserted in ZTABLE.
    Field TEL1 can be only of two values 01 or 02, other combination is not valid...
    I must have all data from Oracle table ORAC in ZTABLE and opposite.
    It should be the same scenario for DELETE...
    And this communication should be online between sap and table in oracle database...
    Can u help me from sap side? and give idea how to configure on oracle side??
    Thanks a lot,
    Nihad

    I dont know if we can directly connect to a oracle database ( wait for the answers from others on this )
    but in XI we have the JDBC adaptor to insert and retrieve data.
    so for the outbound from SAP the flow can be something like this (with XI in landscape):
    1) You have a screen to maintain a new entry / delete an entry
    2) On save , this record gets saved or deleted from the Ztable in SAP
    3)) In the same screen you can call a proxy class-method (generated using SPROXY transaction ) to send the record to XI.
    4) XI to format it and insert into the oracle table
    Mathews

  • Update/insert/delete data from xcelsius to Database via web service

    Hi,
    I need to create dashboard that go function can <b>update/insert/delete</b> data send to <u>Database</u> thru <u>web services</u>, as i know got 2 xcelsius add-on software which support those of function <b>InfoBurst</b> and <b>flynet </b>
    <b>InfoBurst</b>
    http://www.infosol.com/azbocug/minutes/4-Writeback%20to%20a%20Database%20with%20Xcelsius.pdf
    <b>flynet </b>
    http://www.flynetviewer.com/public/community/Blogs/FlynetXcelsiusServerUser/default.aspx
    Except this 2 purchase add-on xcelsius, any other solution ?  
    Maybe need to write some in MSSQL or C# programming which enable insert, update, delete ...etc  ?
    *note: i not use Xcelsius Engage Server , i use Xcelsius Engage only
    thanks,
    regards
    s1
    Edited by: Leong Pui Kee on Mar 1, 2011 6:06 AM

    Hi,
    As of now in Xcelsius/Dashboard Design there is no feature or functionality to insert/update/delete data from database.
    Solution:
    Create a Web service in let’s say C# or Java, which will perform insert/update/delete operation.
    In Xcelsius add Web Service connection and user above web service.
    Xcelsius Web Service connection provides option to pass input values to a Web Service (Input Pane) and get the result (Output values pane).
    We can pass values to be written to the database as a input to Web Service via Web Service connection from Xcelsius and write data to the database.
    Note:
    Performing delete operation from Xcelsius Dashboard could be risky and may delete important data from database. I would not prefer giving delete option/functionality in Xcelsius dashboard.
    Hope this helps!
    Thank you.
    Regards,
    Vinay Mhaske

  • Export data from table with CLOB column

    DB: Oracle10g
    SQLDeveloper: 1.0
    OS: windows xp for sqldeveloper
    Linux for Oracle db
    we have a table with two CLOB columns. We want to export the data to either text or csv. But the CLOB columns don't show up in the columns that can be exported.
    How do I export CLOB data from SQL Developer?
    Regards,
    Lonneke

    I don't think this is a good protection: you can have these characters in VARCHAR anyway, and this way you "throw the baby out with the bath water". Not mentioning that right now also immune formats like HTML are also limited.

  • Help needed badly Insert text data from xml files into tables

    Hi all, I have asked to do insertion of text from a xml file into tables upon receiving using pro*c. i've done quite an amount of research on xml parser in c but there wasn't much information for mi to use for implementation...
    Guys don't mind helping me to clarify few doubts of mine...
    1. Where can i get the oracle xml parser libs? Is it included when i installed oracle 8i?
    2. Is there any tutorials or help files for xml parser libs where i can read up?
    I need the xml parser to recognise the tags, followed by recognising the text after the tags.
    eg. xml format
    <studentID> 0012 </studentID>
    <student> john </student>
    <studentID> 0013 </studentID>
    <student> mary </student>
    text willl be inserted into tables like this:
    studentID | student
    0012 | john
    0013 | mary
    by the way i'm using oracle 8i on HP-UX. Thanks in advance.

    I can answer one of of your questions at least
    1. Where can i get the oracle xml parser libs? Is it included when i installed oracle 8i?You need the XML XDK. You can use http://www.oracle.com/technology/tech/xml/xdkhome.html as your starting point. I believe the 9i version works for 8i.
    I have no pro*c experience so I can't offer any other suggestions regarding how to do this in pro*c.

  • The most effective way from varchar2 to CLOB?

    this is my table's TAB structure on Oracle 10g r2:
    TAB_ID (PK),
    TAB2_ID (FK constraint to TAB2(TAB2_ID), index created),
    TEXT varchar2(4000)
    What is the most effective way to convert varchar2(4000) column to CLOB column?
    1. create new table TAB_NEW with column TEXT as CLOB,
    then insert /*+ APPEND */ into TAB_NEW SELECT * FROM TAB,
    then rename table TAB to TAB_OLD,
    then drop constraint and indexes
    then rename TAB_new to TAB
    then add constraints primary key and foreign key,
    then add index on TAB2_ID
    then drop table TAB_OLD
    OR
    2. rename column TEXT(varchar2) to TEXT_OLD
    then add column TEXT(type CLOB)
    then update(how the most effective?) TAB set TEXT=TEXT_OLD
    drop column TEXT_OLD.

    1 will work, as you can assign a VARCHAR2 to a CLOB and Oracle will convert it.
    2 is redundant.
    Sybrand Bakker
    Senior Oracle DBA

Maybe you are looking for

  • HP Color LaserJet Pro MFP M177fw

    My printer was working fine and suddenly stopped working. The printer now is stuck in the initializing mode. I've restored the factory setting, power cycled the printer (both with the power button and by disconnecting the power cord) to no avail. How

  • Slow response time for HTTP requests

    I have an 8310 Pearl. For the past week, I've noticed that the response time using the Internet browser was very slow. One work-around was to cancel the request and then submit it again. The second request returned the page MUCH faster. I cleared my

  • The music in my itunes library says it cant be found.

    The music in my itunes library says it cant be found and ive tried to sync my ipod touch (4g) with the library to transfer the purchases yet the music in my itunes library says  file can not be found" im trying to put music on my new ipod nano but on

  • Translate function of oracle, equivalent function in informatica?

    Hi All, I know its off topic but i am stuck very very badly and this place turns out to be he best for my issues, here is my problem: lets say i hve fname coming from a flatfile and the first name is 'rahul' , it should be translated as '12345' usin

  • Hide Person Responsible field for IW21

    Hello, As a business process requirement, we were requested to hide or greyout  the "Person Responsible" field in IW21. Can any one help us set that up. Thanks.