dbTalk Databases Forums  

distinct

comp.databases.oracle.misc comp.databases.oracle.misc


Discuss distinct in the comp.databases.oracle.misc forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
vertigo
 
Posts: n/a

Default distinct - 02-17-2005 , 02:28 AM






Hello
i have table with columns: empno, empname and salary.

How should i ask to receive empno,empname and salary for distinct
empname (empno and salary could be the same)?

Thanx
Michal


Reply With Quote
  #2  
Old   
Rauf Sarwar
 
Posts: n/a

Default Re: distinct - 02-17-2005 , 04:17 AM







vertigo wrote:
Quote:
Hello
i have table with columns: empno, empname and salary.

How should i ask to receive empno,empname and salary for distinct
empname (empno and salary could be the same)?

Thanx
Michal
What exactly are your trying to do? Most likely empno is unique in this
table and probably part of the PK... which is correct since employee
names and salary may not be unique BUT your statement "(empno and
salary could be the same)" is contrary to that. What you are trying to
extract does not make sense because what if there are 5 John Doe's and
5 Jane Doe's each. There only distinction is empno.

Regards
/Rauf



Reply With Quote
  #3  
Old   
vertigo
 
Posts: n/a

Default Re: distinct - 02-17-2005 , 07:10 AM





Rauf Sarwar wrote:

Quote:
vertigo wrote:

Hello
i have table with columns: empno, empname and salary.

How should i ask to receive empno,empname and salary for distinct
empname (empno and salary could be the same)?

What exactly are your trying to do? Most likely empno is unique in this
table and probably part of the PK... which is correct since employee
names and salary may not be unique BUT your statement "(empno and
salary could be the same)" is contrary to that. What you are trying to
extract does not make sense because what if there are 5 John Doe's and
5 Jane Doe's each. There only distinction is empno.
you're right - my statemant did not have sense.

Thanx
Michal



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.