Author Topic: Need Help on Oracle Select statement on Distinct rownum  (Read 144 times)

0 Members and 1 Guest are viewing this topic.

Offline GBTalk

  • Full Member
  • *
  • Posts: 187
  • Karma: +0/-0
    • View Profile
Need Help on Oracle Select statement on Distinct rownum
« on: October 06, 2008, 04:52:13 AM »
I have the following code for my oracle select statement.

Code: [Select]
select distinct
rownum, A.products, a.ml_name, a.doc_type
from adbmis.REP_DMS A where doc_status=\'Pending\' and products=\'32343-01-1\'

The output shown from above code is this:
6   32343-01-1   Bert   Social and/or Environmental Monitoring Report
8   32343-01-1   Bert   Project/Program/TA Completion Report
1   32343-01-1   Bert   Final and/or Revised Resettlement Plan
5   32343-01-1   Bert   Project Administration Memorandum
3   32343-01-1   Bert   Legal Agreement (Public Sector only)
7   32343-01-1   Bert   Change of Scope
4   32343-01-1   Bert   Legal Agreement (Public Sector only)
2   32343-01-1   Bert   Final and/or Revised Indigenous Peoples Development Plan

Is there anyway i can get rid of the duplicate in DOC_TYPE Column ? i tried removing ROWNUM in the select statement and the query seems working but I need the rownum function. all i want is to show all unique doc_type values without taking away rownum column. I hope there\'s somebody in the forum who could help me out on this.

Many Thanks.

Techronnati | where technology never sleeps

Need Help on Oracle Select statement on Distinct rownum
« on: October 06, 2008, 04:52:13 AM »

Mountain View


Related Topics

  Subject / Started by Replies Last post
0 Replies
Last post August 01, 2008, 05:51:49 AM
by Techronnati
0 Replies
Last post October 01, 2008, 02:31:56 AM
by arpee
4 Replies
Last post November 15, 2017, 10:58:35 AM
by LadyProgrammer
0 Replies
Last post May 14, 2015, 07:29:50 AM
by rpmolecule
0 Replies
Last post August 17, 2017, 03:20:02 AM
by JusticeLeague

Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.