niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » Databases » Oracle
distinct
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
Author Message
vertigo
*nix forums addict


Joined: 23 Mar 2005
Posts: 71

PostPosted: Thu Feb 17, 2005 7:28 am    Post subject: distinct Reply with 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
Back to top
Rauf Sarwar
*nix forums Guru


Joined: 03 May 2005
Posts: 353

PostPosted: Thu Feb 17, 2005 9:17 am    Post subject: Re: distinct Reply with quote

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
Back to top
vertigo
*nix forums addict


Joined: 23 Mar 2005
Posts: 71

PostPosted: Thu Feb 17, 2005 12:10 pm    Post subject: Re: distinct Reply with quote

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
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 1 [3 Posts] View previous topic :: View next topic
The time now is Thu Jan 08, 2009 6:21 am | All times are GMT
navigation Forum index » Databases » Oracle
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts number of distinct values in tsearch2 gist index Kevin Murphy PostgreSQL 0 Tue Jul 18, 2006 5:24 pm
No new posts mysql selecting distinct in one collumn but retrieving al... monomaniac21 PHP 4 Wed Jul 12, 2006 3:15 pm
No new posts Bug? Changing where distinct occurs produces error? Michael Loftis PostgreSQL 3 Fri Jul 07, 2006 9:52 pm
No new posts Distinct from two tables Mark Steudel MySQL 1 Thu Jun 29, 2006 9:15 pm
No new posts Distinct problem Tanner Postert MySQL 5 Wed Jun 28, 2006 9:27 pm

Internet Advertising | Bankruptcy | Free Advertising | Industrial Directory | Bankruptcy
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1577s ][ Queries: 16 (0.0888s) ][ GZIP on - Debug on ]