Click here to Skip to main content
11,431,844 members (63,615 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
EMP Table AS Follows;

 EMPID  EMPNAME  MGRNo   MGRNAME
  1     Raj      Null     RAvi
  2     Ram       1       Sam
  3     Hari      2       Yogi
from the above EMP Table i wan the output as follows;

I want the output
EMPID  EMPNAME  MGRNAME
 1     Raj       RAvi
 2     Ram       Sam   
 3     Hari      Yogi

For that how to write the query.

[edit]Code block added - OriginalGriff[/edit]
Posted 25-Nov-12 22:32pm
Edited 25-Nov-12 22:34pm
v2
Comments
Killzone DeathMan at 26-Nov-12 4:32am
   
Boring!!!
That's to easy!
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 4

Select EMPID,EMPNAME,MGRNAME from EMP
It should work..
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Try:
SELECT EmpId, EmpName, MgrName FROM Emp
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 3

Select EmbId as EmployeeID,EmpName as EmployeeName,MgrName as ManagerName from Emp
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



Advertise | Privacy | Mobile
Web04 | 2.8.150428.2 | Last Updated 26 Nov 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100