SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 need query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

praveen050
Starting Member

9 Posts

Posted - 06/05/2012 :  05:10:34  Show Profile  Reply with Quote
query to show manager of each Employee

o/p
EmpID EmpNAme Department ManagerID Manager Name
EMP002 Zuckerman, Larry HR EMP001 Zuniga, Alberto
EMP003 Zucker, Al IT EMP001 Zuniga, Alberto
EMP004 Zoll, Kelly Finance EMP001 Zuniga, Alberto

Query to Update the table with Manager Department where Employee Department Is missing

EmpID EmpNAme ManagerID Department
EMP001 Zuniga,Alberto CEO
EMP002 Zuckerman,Larry EMP001 HR
EMP003 Zucker,Al EMP001 IT
EMP004 Zoll,Kelly EMP001 Finance
EMP005 Zimmershead,Michael EMP002 HR
EMP006 Zimmerman,Beverly EMP002
EMP007 Zimmerman Alejandro EMP002 HR
EMP008 Ziegler, Melissa EMP003 HR
EMP009 Ziegler,James EMP003
EMP010 Ziegler, Jacalyn EMP003 HR
EMP011 Ziegler, Greg EMP003 HR
EMP012 Ziarnik, Adam EMP004 Finance

webfred
Flowing Fount of Yak Knowledge

Germany
8513 Posts

Posted - 06/05/2012 :  05:35:44  Show Profile  Visit webfred's Homepage  Reply with Quote
Looks like you are wanting us to do your job.
That's not funny.


No, you're never too old to Yak'n'Roll if you're too young to die.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000