|
|
|
|
|
|
| Author |
Message |
vertigo *nix forums addict
Joined: 23 Mar 2005
Posts: 71
|
Posted: Thu Feb 17, 2005 7:28 am Post subject:
distinct
|
|
|
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
|
Posted: Thu Feb 17, 2005 9:17 am Post subject:
Re: distinct
|
|
|
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
|
Posted: Thu Feb 17, 2005 12:10 pm Post subject:
Re: distinct
|
|
|
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 |
|
 |
|
|
The time now is Thu Jan 08, 2009 6:21 am | All times are GMT
|
|
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
|
|