Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 need query

Author  Topic 

praveen050
Starting Member

9 Posts

Posted - 2012-06-05 : 05:10:34
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
Master Smack Fu Yak Hacker

8781 Posts

Posted - 2012-06-05 : 05:35:44
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
   

- Advertisement -