on 02-22-2011 5:36 AM
Hi i am working on JDBC to IDOC scenario.
When i am fetching the records from the Oracle database table using select query, i am getting the records but its getting duplicated many a times and hence its failing at an idoc processing at ECC side..
Could someone help me in deleting the Duplicate entries and passing only the required entries from Oracle databse to IDOC.
Here is my select query.:
Select a.order_num, a.sap_delivery_number, a.sap_delivery_line_number, a.warehouse, a.product, a.product_size, a.order_qty, a.ship_qty from XXX_h a,tr_log t where a.Prod_id = 101..
Appreciate your help.
Regards
What do you mean by duplicate records? is is picking old data also?? iy yes then write update statement correctly to update the Flag filed.
Regards,
Raj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1)First check in Data base table , if any duplicte records available, if yes then ask DB team to handle this in DB level.
2)If no duplicate records in DB , then check your select query , it might be wrong, execute same SQL Query stand alone and see the results. if it is giving duplicate records then correct it.
3)if Select query correct and data also correct, if you want filter records then write a mapping logic in mapping level to filter .
Regards,
Raj
>> Its not picking up the old data instead, it is repeating the same set of data multiple times.
The below suggestion might be helpful
a) First do your select statement
b) Second , Use update statement and here set some flag in that table that these records are already queried. say boolean read = true for the above queried records.
That's it. When you query next time, you will not reread the same data. You will read the new data.
Duplicate Entries: Check with db client tool like Toad or sqlplus and see whether duplicate entries exists in the table. If so, then fix the data first.
Edited by: Baskar Gopal on Feb 22, 2011 1:02 PM
Is it Prod ID not a unique key in your table?
Also one more doubt whats a use of 2nd table in your query.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.