Author |
Topic |
dubaashu
Starting Member
10 Posts |
Posted - 2012-08-18 : 10:38:21
|
Dear All Experts,I am having following query for employee MasterSelect Firstname , jobTitle , position from mytableby this i am getting result as Firstname jobTitle positionViral Director 6Kalpesh Regional Manager 7Vikas Area Manager 8Pradeep Manager 9Dharmendra Sales Engineer 10Sudeesh Sales Engineer 10I Want result as :Director Regional ManagerArea ManagerManagerSales EngineerViral Kalpesh Vikas Pradeep DharmendraViral Kalpesh Vikas Pradeep SudeeshKindly help to get desired resultAshish gupte |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-18 : 11:08:11
|
ok. is there a field to relate corresponding row values?------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
dubaashu
Starting Member
10 Posts |
Posted - 2012-08-18 : 11:32:11
|
Hi ,I am having one more field called Position which is numeric and defined for Jobtitle Like when Position is 1 then Director when 2 then Regional Manager ...Ashish gupte |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-18 : 11:41:41
|
quote: Originally posted by dubaashu Hi ,I am having one more field called Position which is numeric and defined for Jobtitle Like when Position is 1 then Director when 2 then Regional Manager ...Ashish gupte
Thats fineBut my question was more on field using which you determine which manager,director,regional manager etc should come in same row. There should be a relating field using which you should relate them together onto same row or is it just putting some random people together (which IMHO doesnt make any sense)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
dubaashu
Starting Member
10 Posts |
Posted - 2012-08-18 : 11:55:43
|
Yes i think you can relate with Two More field which is feild Name is Manager and EmpidAshish gupte |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-18 : 12:12:53
|
quote: Originally posted by dubaashu Yes i think you can relate with Two More field which is feild Name is Manager and EmpidAshish gupte
can you give full table structure with sample data? Without which I cant understand how data is present------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
dubaashu
Starting Member
10 Posts |
Posted - 2012-08-18 : 12:16:29
|
Hi Sample Data are as Empid Firstname Jobtitle Position Manager9 Viral Director 6 NULL10 Kalpesh Regional Manager 7 911 Vikas Area Manager 8 1012 Pradeep Manager 9 1113 Dharmendra Sales Engineer 10 1214 Sudeesh Sales Engineer 10 12Ashish gupte |
 |
|
dubaashu
Starting Member
10 Posts |
Posted - 2012-08-18 : 12:36:16
|
Thanks It solved my problemAshish gupte[/quote]Thats fineBut my question was more on field using which you determine which manager,director,regional manager etc should come in same row. There should be a relating field using which you should relate them together onto same row or is it just putting some random people together (which IMHO doesnt make any sense)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/[/quote]Ashish gupte |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2012-08-18 : 12:39:01
|
ok cool------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|