How to eliminate inserting  Duplicate rows into database using JDBC Adapter

File->Xi->JDBC
In above Scenario if the file has two rows their values are identical, then how can we eliminated inserting  Duplicate rows into database using JDBC Adapter

Database is a consumer of a SERVICE (SOA!!!!!!).
Database plays a business system role here!!!!
Mapping is part of an ESB service
Adaptor is a technology adapted to ESB framework to support specific protocol.
ESB accomplish ESB duties such as transformation, translation, routing. Routing use a protocol accepted by the consumer. In a JDBC consumer it is JDBC protocol and hence it a JDBC adaptor.
There is clear separation on responsibilities among business system and ESB. ESB do not participate in business decision or try to get into business system data layer.
So who ever are asking people to check duplicate check as part of mapping (an ESB service) may not understand integration practice.
Please use an adaptor module which will execute the duplicate check with business system in a plug and play approach and separate that from ESB service so that people can build integration using AGILE approach.
Thanks

Similar Messages

  • Inserting multiple rows into database using c#

    Hi,
    I have a web form with a customer id and a few checkboxes with different products (productid) and when a user checks the checkbox he must also enter a date for that product. 
    I need to basically do the following insert into Customer  (customerid,productid, purchasedate) values (1,890,18/12/2003)
    insert into Customer  (customerid,productid, purchasedate) values (1,56,12/12/2004)
    For each product checked I need to insert the details into the database with the same customerid.
    The database table looks like this:
    Customer Table
    CustomerId int
    ProductId int
    PurchaseDate datetime
    What is the correct way to do that? Should I change the database table?
    Thanks

    This has nothing to do with C#. Ask in the SQL forum for your database product for bulk insertion options.
    Visual C++ MVP

  • How do i insert a row into Numbers

    I'm new to numbers - how do i insert a row into a spreadsheet please?  The spreadshet started life in excel and was imported and saved as numbers.  I did try the help option but didn't seem to get the answer.

    right click on the row tab then select the "Add Row Above" or "Add Row Below"

  • Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    Any ideas how I can insert a pdf into word, using the insert object option. However the pdf i want to insert has text and lines annotated, but once inserted the comments don't appear????  any help would be greatly appreciated.

    You will need to find a forum for MS Word since that is the software that you are trying to manipulate in this.  If you think the processing/creation of the PDF plays a role then you should ask in the forum for the software that you are using to create the PDF.
    This forum is for issue regarding downloading and installing Adobe trial products, so in any circumstance, your issue does not fit in this forum.

  • NCHAR issue with oracle database using JDBC adapter

    Hi,
    We have a requirement to develop an XI interface from FTP server(File adapter) to oracle database using JDBC adapter. In the oracle database table few fields are of type NCHAR/NVARCHAR. when we try to insert the character(A,B,c..) values into oracle table fields of type NCHAR/NVARCHAR, we are getting the following error message in the JDBC adapter audit log. IF we pass the numeric value to the same field, then we are able to insert the records successfully.
    Unable to execute statement for table or stored procedure. 'IPCSDD_DOWNLOAD_PROCESS' (Structure 'StatementName1') due to java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error JDBC message processing failed; reason Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    2010-10-19 22:29:59 Error MP: Exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: Error when executing statement for table/stored proc. 'IPCSDD_DOWNLOAD_PROCESS' (structure 'StatementName1'): java.sql.SQLException: ORA-00904: "P": invalid identifier
    Please find the system information below.
    Oracle version- 10.2.4
    XI version - 3.0/ service pack 19
    JDBC driver- oracle.jdbc.driver.OracleDriver
    Please suggest.
    Thanks,
    Venkata
    Edited by: Venkata Narayana  Eepuri on Oct 21, 2010 12:10 AM

    Dear Venkata Narayana,
    Concerning the error, kindly go through the following note :
    731 - Collective note: ORA-00904
    follow the recommendations mentioned in that and please check if that helps.
    Best Regards
    Nishwanth

  • Inserting Multiple Rows into Database Table using JDBC Adapter - Efficiency

    I need to insert multiple rows into a database table using the JDBC adapter (receiver).
    I understand the traditional way of repeating the statement multiple times, each having its <access> element. However, I am just wondering whether this might be performance-inefficient, as it might insert records one by one.
    Is there a way to ensure that the records are inserted into the table as a block, rather than record-by-record?

    Hi Bhavesh/Kanwaljit,
    If we have multiple ACCESS tags then what happens is that the connection to the database is made only once. But the data is inserted row by row.
    Why i am saying this?
    If we add the following in JDBC Adapter..logSQLStatement = true. Then incase of multiple inserts we can see that there are multiple
    <i>Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','1000')
    Insert into tablename(EMP_NAME,EMP_ID) VALUES('J','2000')</i>
    Doesnt this mean that rows are inserted one by one?
    Correct me if i am wrong.
    This does not mean that the transaction is not guaranted. Either all the rows will be inserted or rolled back.
    Regards,
    Sumit

  • How to eliminate the duplicate rows in the table

    How can we eliminate the duplicate rows in the table. Is it possible to write a single query or should we write a pl/sql block to do it

    Scope works outwards.
    SQL> DECLARE
      2    n NUMBER;
      3  BEGIN
      4    n := 0;
      5    DECLARE
      6      n number;
      7    BEGIN
      8      n := 2;
      9      dbms_output.put_line(n);
    10    END;
    11  END;
    12  /
    2
    PL/SQL procedure successfully completed.
    SQL> DECLARE
      2    n NUMBER;
      3  BEGIN
      4    n := 0;
      5    DECLARE
      6      x number;
      7    BEGIN
      8       dbms_output.put_line(n);
      9       n := 2;
    10        dbms_output.put_line(n);
    11    END;
    12  END;
    13  /
    0
    2
    PL/SQL procedure successfully completed.
    SQL> ed
    Wrote file afiedt.buf
      1  DECLARE
      2    n NUMBER;
      3  BEGIN
      4    n := 0;
      5    DECLARE
      6      x number;
      7    BEGIN
      8       dbms_output.put_line(n);
      9       x := 2;
    10     END;
    11       dbms_output.put_line(x);
    12  EXCEPTION
    13     WHEN others THEN      dbms_output.put_line('oh no!');
    14* END;
    15  /
         dbms_output.put_line(x);
    ERROR at line 11:
    ORA-06550: line 11, column 27:
    PLS-00201: identifier 'X' must be declared
    ORA-06550: line 11, column 6:
    PL/SQL: Statement ignored
    SQL> Cheers, APC

  • Inserting multiple rows into database table

    hi
    I have a simple jsp/html page like this:
    <h1>Enter Comments</h1>
       <select name = "g1">
            <option>10</option>
            <option>20</option>
            <option>30</option>
            <option>40</option>
            <option>50</option>
            <option>60</option>
            <option>70</option>
            <option>80</option>
            <option>90</option>
            <option>100</option>
        </select> <input name = "comment1" type = "text" size = "60"><p>
         <select name = "g1">
            <option>10</option>
            <option>20</option>
            <option>30</option>
            <option>40</option>
            <option>50</option>
            <option>60</option>
            <option>70</option>
            <option>80</option>
            <option>90</option>
            <option>100</option>
        </select> <input name = "comment1" type = "text" size = "60"><p>but when i say : String fruit=request.getParameter("g1");
    String fruit=request.getParameter("comment1");
    only one gets written into the table. How would I write them both into seperate rows of the table? e.g.
    g1 comment1
    g1 comment1
    thank you all,

    change the name of the second select and second text element.
    You're only getting one because they're named the same, so the second one is overwriting the values of the first.
    HTH.

  • Inserting multiple columns into database using dbtool set

    I have  a labVIEW program that is currenly simulating voltage and a current signal using the DAQ Assistant. I'm using the database connectivity toolset. I am currently able to insert one signal into the database converted to a float(I can insert both into the same column as bianary but it needs to be stored as a usable format and in seperate columns.)
    The problem I am having is at the DB Tools Insert Data block. I have the connection, dbTable, error code, and create table boolean being passed into it. Where I am a little lost is how to set the columns I want to store the multiple signals into.
    If someone could break that part down for me that would be great. In short, I want to store voltage(channel0) and current(channel1) from the DAQ Assistant into their own respective columns in the db.
    Message Edited by DonPoulson on 07-10-2007 11:04 AM

    Don,
    This particular forum is specific to TestStand, not LabVIEW or Multifunction DAQ. You may have a better chance at responses by posting to either of those forums rather than here.
    Brandon Vasquez | Software Engineer | Integration Services | National Instruments

  • Error: Could not insert message (INBOUND) into database in JDBC scenario

    Hello Experts,
    We have implemented an IDoc- JDBC scenario on PI 7.1.On sending an IDoc DEBMAS it gives the following error in SXMB_moni of PI.
    com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not insert message 167088e0-92c5-11de-c968-36d2afd1680e(INBOUND) into database. Reason: java.sql.SQLException: ORA-00904: "DSR_PASSPORT": invalid identifier
    Kindly advice.
    Thanks in advance,
    Elizabeth.

    >
    Elizabeth Jacob wrote:
    > Hello Experts,
    >
    > We have implemented an IDoc- JDBC scenario on PI 7.1.On sending an IDoc DEBMAS it gives the following error in SXMB_moni of PI.
    >
    > com.sap.engine.interfaces.messaging.api.exception.MessagingException: Could not insert message 167088e0-92c5-11de-c968-36d2afd1680e(INBOUND) into database. Reason: java.sql.SQLException: ORA-00904: "DSR_PASSPORT": invalid identifier
    >
    > Kindly advice.
    >
    > Thanks in advance,
    > Elizabeth.
    please check if DSR_PASSPORT is a valid field in the table or is it missing .
    Description of ORA-00904 error;
    ORA-00904:     string: invalid identifier
    Cause:     The column name entered is either missing or invalid.
    Action:     Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and consist of only alphanumeric characters and the special characters $, _, and #. If it contains other characters, then it must be enclosed in double quotation marks. It may not be a reserved word.

  • Meeting trouble when inserting a record into dababase using JDBC.

    Hi, everyone!
    If I want to insert a record in a table of a database, but I
    do not know whether there is already a primary key existing in
    the database (I mean the value of the record which I want to insert
    conflicting, i.e. duplicating, with one of the value of primary
    key in the database). So, I have two solutions:
    1. check whether there is already a primary key which confilcting
    with the value I want to insert, if not, insert into database.
    2. do not do any check before and insert the record directly, and catch
    SQLException.
    But they both have shortcomings. Solution 1 will lost time (must checking first)
    and solution 2 will throw a SQLException, and from the Exception, I do not know
    how can I infer it is a primary key conflicting exception.
    (I do not know how to distinguish it from other type of SQLException, for example,
    database name error exception or SQL statement syntax error).
    I do not know whether I have made myself understood.
    Who have better solutions?
    Thanks in advance,
    George

    If I use solution 2, can I get some information from
    SQLException? For example, can the exception tell me
    whether it is a duplicated primary key error or SQL
    statememt syntax error? You don't have to look at the error text. You should
    look at the error code. But keep in mind that
    it is vendor specific. A duplicate key error in Oracle
    has different error code then in SQL Server.Sounds good in theory, in practice it leaves a lot to be desired. First one still has to figure out which codes are problematic, and there is still no guarantee that they won't change. Moreover you might find that the code is used for different types of errors, and that won't work.
    >
    May you can have a look at the sqlstate, this should
    be the same across different DB's as it is defined int
    he SQL92 standard, but I wouldn't bet on it...
    I would bet - against it.

  • How can i put a file into blob using jdbc !?

    Hi
    i tried to put a file into blob , but got a problem.....
    My environment:windows 2000pro,JBuilder 5.0 enterprise,oracle 8.1.6,(not install oracle jdbc driver )
    a part of program(my program is very uglily,if anyone want,later i paste it ba....~_~)
    //Statement stmt2=null;
    //Resultset rs2;
    //opa1 is the blob data
    void saveBlobTableToDisk(Connection con) {
    try {
    stmt2=con.createStatement();
    sqlStr2="SELECT * FROM emp3 where id=1004";
    rs2=stmt2.executeQuery(sqlStr2);
    while (rs2.next()) {
    Blob aBlob=rs2.getBlob("opa1");
    i got the exception :
    " null
    java.lang.UnsupportedOperationException
         at sun.jdbc.odbc.JdbcOdbcResultSet.getBlob(JdbcOdbcResultSet.java:4174)
         at test3.Frame1.saveBlobTableToDisk(Frame1.java:48)
         at test3.Frame1.<init>(Frame1.java:26)
         at test3.Application1.<init>(Application1.java:5)
         at test3.Application1.main(Application1.java:8) "
    and the windows pop up a messagebox said that(about) my memory "0x09af007f" could not read, error in javaw.exe .
    Later i used (ResultSet)getBinaryStream() to solve it. but getBinaryStream() only return a InputStream,so that i can make blob to a file,but i can't make a file to blob using jdbc.....
    I am very stupid that installing sun java, oracle jdbc driver etc....(because i must set a lot of thing such as classpath,java_home etc), Can i only use JBuilder to do that ?
    Or i must install oracle jdbc driver ?
    Thanks.
    D.T.

    My guess here is that Sun's JDBC-ODBC bridge doesn't handle the BLOB datatype. Most ODBC drivers don't support that datatype, so I wouldn't expect the bridge to.
    Is there a reason that you can't use the Oracle driver?
    Justin

  • How can read data from my local PC using JDBC adapter

    Hi experts.
    Actually we don't have permissions to work on RDBMS. So by locally I have Oracle8.0 installed in my pc. so can i update the table in my database via JDBS adapter. If so please describe how and where can I find the connectivity between XI server and my local DB system.
    Thanks.

    The first question is: Can the XI access your local PC?
    In most environments this is not possible.
    Connect to the server where the XI is installed and log on with the <sid>adm user (or let an administrator do this). Try to ping your PC.
    If this is successful, you have a good chance to connct your database. Follow the description in your database manual, which parameters you need to enter in the JDBC adapter channel.
    Regards
    Stefan

  • Inserting Multiple Images into oracle database using JDBC

    I wanted to insert multiple images into database using JDBC by reading it from the file... and i am passing photos.txt(my text file) as an input parameter... I have inserted all the values into the database except for the image part... this is my content of photos.txt file and i have copied all the images into the folder
    *" C:\\photos "*
    *1,in1.jpg,108,19,in-n-out*
    *2,in2.jpg,187,21,in-n-out*
    *3,in3.jpg,308,41,in-n-out*
    *4,in4.jpg,477,52,in-n-out*
    *5,in5.jpg,530,50,in-n-out*
    and i want to store in1.jpg,in2.jpg,in3.jpg,in4.jpg,in5.jpg into the oracle databse using JDBC.... i have tried a lot using BLOB column.... and i have created my table as
    CREATE TABLE PHOTO(
    ID NUMBER NOT NULL PRIMARY KEY ,
    Name BLOB,
    X DOUBLE PRECISION,
    Y DOUBLE PRECISION,
    Tags VARCHAR2(40)
      try {                 // for restaurant System.out.println();System.out.println();System.out.println(); System.out.print("  Creating Statement for Photo...\n");             stmt2 = con.createStatement ();                       stmt2.executeUpdate("delete from PHOTO"); stmt2.executeUpdate("commit"); PreparedStatement stmt3 = con.prepareStatement ("INSERT INTO PHOTO VALUES (?, ?, ?, ?, ?)");             System.out.print("  Create FileReader Object for file: " + inputFileName1 + "...\n");             FileReader inputFileReader2 = new FileReader(inputFileName1);             System.out.print("  Create BufferedReader Object for FileReader Object...\n");             BufferedReader inputStream2  = new BufferedReader(inputFileReader2);             String inLine2 = null;                         String[] tokens; //            String[] imageFilenames = {"c:\\photos\\in1.jpg","c:\\photos\\in2.jpg","c:\\photos\\in3.jpg","c:\\photos\\in4.jpg","c:\\photos\\in5.jpg", //  "c:\\photos\\in6.jpg","c:\\photos\\in7.jpg","c:\\photos\\in8.jpg","c:\\photos\\in9.jpg","c:\\photos\\in10.jpg","c:\\photos\\arb1.jpg","c:\\photos\\arb2.jpg", //  "c:\\photos\\arb3.jpg","c:\\photos\\arb4.jpg","c:\\photos\\arb5.jpg","c:\\photos\\den1.jpg","c:\\photos\\den2.jpg","c:\\photos\\den3.jpg", //  "c:\\photos\\den4.jpg","c:\\photos\\den5.jpg","c:\\photos\\hop1.jpg","c:\\photos\\hop2.jpg","c:\\photos\\hop3.jpg","c:\\photos\\hop4.jpg","c:\\photos\\hop5.jpg"};               File file = new File("C:\\photos\\in1.jpg");            \\ ( Just for example  )           FileInputStream fs = new FileInputStream(file);                         while ((inLine2 = inputStream2.readLine()) != null) {               tokens= inLine2.split(",");             st2 = new StringTokenizer(inLine2, DELIM);                                                             stmt3.setString(1, tokens[0]);               stmt3.setBinaryStream(2, fs, (int)(file.length()));               stmt3.setString(3, tokens[2]);               stmt3.setString(4, tokens[3]);               stmt3.setString(5, tokens[4]);               stmt3.execute(); //execute the prepared statement               stmt3.clearParameters(); 
    As i am able to enter one image file by above code in1.jpg in to the oracle database.... but i am not able to insert all the image file in to the database.....do tell me what should i do.... and can you give me the example on the basis of the above code of mine...
    do reply as soon as possible..

    jwenting wrote:
    that depends. Putting the images in BLOBs prevents the file locations stored in the database from getting out of synch with the filesystem when sysadmins decide to reorganise directory structures or "archive" "old" files that noone uses anyway.True, but it really comes down to a business decision (cost-benefit analysis). If you have the bucks, the expertise, and the time, go with the Blobs, otherwise go with the flat files.

  • Inserting multiples rows into a table using function or procedure..

    How do i insert multiples rows into a table using function or procedure?
    Please provide me query..

    Use FORALL bulk insert statement...
    eg:
    procedure generate_test_data as
    type cl_itab is table of integer index by pls_integer;
    v_cl_itab cl_itab;
    type cl_vtab is table of varchar2(25) index by pls_integer;
    v_cl_vtab cl_vtab;
    type cl_dtab is table of date index by pls_integer;
    v_cl_dtab cl_dtab;
    begin
    for i in 1.. 100 loop
              v_cl_itab(i):= dbms_random.value(1,1000);
              v_cl_vtab (i):=dbms_random.string('a',20);
              v_cl_dtab (i):=to_date(trunc(dbms_random.value(2453737, 2454101)),'j');          
         end loop;
         forall i in v_cl_itab.first .. v_cl_itab.last
              execute immediate 'insert into test_order values( :n, :str , :dt ) ' using v_cl_itab(i), v_cl_vtab (i), v_cl_dtab (i);          
         commit;
    end;

Maybe you are looking for

  • Final Cut Pro X for amateurs?

    I am an amateur. I have done some basic editing with windows movie maker and similar but recently became a mac owner. I don't want to waste 300 plus dollars on something that I will find frustrating and unusable. So I guess my question is this; How e

  • Can't see video anymore...

    Hi, I don't know what happenned but I can't see my video anymore... They all became a white square with a X inside... It does the same thing if I import a new video. I tried uninstalling everything but it didn't work, I have Adobe presenter 9, I trie

  • Trial version of crystal report

    Hi, Do anyone know where to download trial version of crystal report and components to connect R3? Thx.

  • The Organizer woll not work

    I can't open the organizer in Photoshop Elements 10 goes stright to the edit. I am running Windows 8 Can someone plese help me

  • Migrate php site to BC

    Hey team, We've been given an opportunity to take over the administration of an existing site but want to know what  steps we need to take to succesfully migrate the php site over to BC. It's a very basic site but it does have one form page. Thanks P