Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> SQL guestion finding duplicates
Hello,
I have a SQL question. Consider the following table...
I'd like to find out all the employees who share the same birthday. I was thinking initially that if I used SQL HAVING that would work... but then I thought (from what I understand about the command) HAVING only works on arithmetic operators. Also if I set up a condition with WHERE, wouldn't that imply some previous knowledge of the birthdays?
My development background screams doing some kind of string compare or regular expression matching but that could either get complicated or perform poorly if the employee table had thousands of rows.
At any rate, how could I write a SQL statement to return all the names (and birthdates) of employees with identical birthdays?
Thanks!!! Received on Mon Jul 11 2005 - 09:38:34 CDT
![]() |
![]() |