Archives of the TeradataForum
Message Posted: Wed, 29 Jul 2010 @ 00:26:54 GMT
Subj: | | Re: Deleting unwanted/duplicate records |
|
From: | | Fred W Pluebell |
It's hard to give a complete answer without knowing the whole question. (I am assuming there is a reason to use ROW_NUMBER versus simply
putting the "RT" condition in the WHERE clause.)
You get two rows because you said "PARTITION BY I_IRD" so ROW_NUMBER "starts over" for each distinct value in that column.
If you drop the PARTITION BY clause, you should get only one. But it may not be the "xxxRTxxx" one because LIKE 'RT%' only matches strings with
RT as the first two characters (not in the middle).
|