Beruflich Dokumente
Kultur Dokumente
Choose one of the following queries to identify or remove duplicate rows from a table leaving only unique
records in the table:
Method 1:
Delete all rowids that is BIGGER than the SMALLEST rowid value (for a given key):
Method 2:
This method is usually faster. However, remember to recreate all indexes, constraints, triggers, etc. on
the table when done.
Method 3:
Note: One can eliminate N^2 unnecessary operations by creating an index on the joined fields in the inner
loop (no need to loop through the entire table on each pass by a record). This will speed-up the deletion
process.
Note 2: If you are comparing NULL columns, use the NVL function. Remember that NULL is not equal to
NULL. This should not be a problem as all key columns should be NOT NULL by definition.
Method 4:
This method collects the first row (order by rowid) for each key values and delete the rows that are not in
this set:
SQL> DELETE FROM my_table t1
1 WHERE rowid NOT IN ( SELECT min(rowid)
2 FROM my_table t2
3 GROUP BY key_value1, key_value2 );
For example , If I have 3 departments with the names Comupers, Accounts and Finance, then We need
to generate the target files as Computers.txt, Accounts.txt and Finance.txt respecivey using Informatica
tool.
ANSWER:
empno deptno
100 10
100 20
100 30
200 10
200 20
200 20
200 10
300 10
300 10
300 10
step 1
drag and drop the columns form the source qualifier to sorter
set the sort key on DEPTNO (Ascending)
step 2
STEP3
DROP empno,DEPTNO, OUTPUT_FILE TO TRANSACTION CONTROL TRANSFORMER WRITE
DECODE (OUTPUT_FILE,1,TC_CONTINUE_TRANSACTION,0,TC_COMMIT_ Before).
step 4
connect to file target with the file name as deptno in target filename port.
2)Ex.
1st file
AAAAAAAAAAAAAAAAAAAAAAAAAA
2nd file
BBBBBBBBBBBBBBBBBBBBBBBBBB
Out put is third file
AAAAAAAAAAAAAAAAAAAAAAAAAA
BBBBBBBBBBBBBBB BBBBBBBBBBB
Now for achieving this i am using session properties with file sequential merge but i am not getting it in
the third file. Even my third file is not created also after the successful Run of session. Please help me in
this and pls mention the procedure that in which file i have to give merge. and do i use command in
informatica session level properties.
I would like to tell all of you i can not Shell Script or even any command task. as the client does't want to
be done in unix.
ANSWER:
Why don,t you take both the files as source and merge them using union trans,and then load it to another
flat file(Third file).just create another pipeline in same mapping to do that.