1

I have a table [Employees] and i want to search the duplicate name and view telelephone each department

 Name Tel Department Drew 2134 IT Jason 34532 IT Drew 35223 Sales Jason 12313 Sales Cruto 32432 IT John 1234 IT John 4321 Sales Rex 5643 Sales 

how to query this to this output

 Name IT Tel NO Sales Tel NO Drew 2134 35223 Jason 34532 12313 John 1234 4321 
1
  • 1
    What does your query look like so far? Commented Nov 8, 2013 at 3:57

1 Answer 1

2
SELECT IT.[Name],IT.[Tel] as IT , Sales.[Tel] as Sales FROM (SELECT [Name], [Tel] FROM Table1 WHERE [Department] = 'IT') AS IT INNER JOIN (SELECT [Name], [Tel] FROM Table1 WHERE [Department] = 'Sales') AS Sales ON IT.[Name] = Sales.[Name] 

FIDDLE

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.