oracle query returns 4 duplicates of each row
Posted
by ajoe
on Stack Overflow
See other posts from Stack Overflow
or by ajoe
Published on 2010-06-14T18:37:03Z
Indexed on
2010/06/14
18:42 UTC
Read the original article
Hit count: 153
hello, I am Running a oracle query, it seems to work except that it returns 4 dupes of each result. here is the code:
Select * from (Select a.*, rownum rnum From (SELECT NEW_USER.*, NEW_EHS_QUIZ_COMPLETE.datetime FROM NEW_USER, NEW_EHS_QUIZ_COMPLETE WHERE EXISTS(select * from NEW_EHS_QUIZ_COMPLETE where NEW_USER.id=NEW_EHS_QUIZ_COMPLETE.USER_ID) ORDER by last_name ASC ) a where rownum <= #pgtop# ) where rnum >= #pgbot#
does anyone know why this isnt working properly? thanks in advance.
© Stack Overflow or respective owner