i have a table with the columns below as
Emp_ID Address_ID Address_Line City Country
-------- --------- ----------- ------ ---------
Q: Display the Emp_ID's those having more than one
Address_ID
Answers were Sorted based on User's Feedback
Answer / gyana ranjan behera
simply write the sql query like
sql>select Emp_ID from table_name groupe by Address_ID
having count(Address_ID )>1;
this is working as per the requirement..i tested
that..thanx ..pls send responces and questions on my mail
id to discuss new situations.
Is This Answer Correct ? | 14 Yes | 3 No |
Answer / shashi
select Emp_ID from table_name groupe by Emp_ID
having count(Address_ID )>1;
Is This Answer Correct ? | 3 Yes | 0 No |
Answer / ajit
Try with this its working
SELECT name,addres FROM ADDR WHERE name IN
(SELECT name FROM ADDR
GROUP BY name
HAVING COUNT(ADDRES) >1)
Is This Answer Correct ? | 1 Yes | 0 No |
Answer / nithya
select Emp_ID from table_name group by Address_ID
having count(Address_ID )>1;
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vijayakumar
we need some sample data's ... then only we can able to write exact query....becoz here emp_id and address_id both are unique.. same data will not repeated....
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / abc
select emp_id from table_name a where a.rowid < (select MAX
(rowid) from test b where b.address_id=a.address_id)
Is This Answer Correct ? | 0 Yes | 1 No |
Answer / nitin
SELECT EMP_ID FROM EMP_ADDRESS WHERE ADDRESS_ID IN
(SELECT ADDRESS_ID FROM EMP_ADDRESS
GROUP BY ADDRESS_ID
HAVING COUNT(ADDRESS_ID) >1)
Is This Answer Correct ? | 1 Yes | 3 No |
select trunc(round(156.00,-1),-1) from dual;
Table1- have two column filename data AFGDFD-20112011 hi how r u bsdasd-23042011 name shoud be in bold Now i want output like filename data AFGDFD hi how r u bsdasd name shoud be in bold Kindly answer this
I want a table like, no name address addr1 addr2 So i want columns like addr1,addr2 under address column. Can one please answer me. Advance Thanks.
After using set unused can we enable the column again to use? Please give me some answers....
what are the different types of cursors? explain?
What is dynamic proxy?
why can't we assign not null constraint as table level constraint
State and explain about oracle instance?
Whatz the main diff between Subquery and a Join
14 Answers Oracle, Zeta Interactive,
how to store only time in a data base table
How to get a list of all user accounts in the database?
Define the SGA and: How you would configure SGA for a mid-sized OLTP environment? What is involved in tuning the SGA?