Click here to Skip to main content
15,913,773 members
Home / Discussions / Database
   

Database

 
GeneralRe: Convert Columns as Rows Pin
Vignesh Krishnan19-Jan-09 8:45
Vignesh Krishnan19-Jan-09 8:45 
GeneralRe: Convert Columns as Rows Pin
swjam19-Jan-09 11:26
swjam19-Jan-09 11:26 
GeneralRe: Convert Columns as Rows Pin
Vignesh Krishnan20-Jan-09 2:10
Vignesh Krishnan20-Jan-09 2:10 
GeneralRe: Convert Columns as Rows Pin
ColinM12319-Jan-09 11:45
ColinM12319-Jan-09 11:45 
GeneralRe: Convert Columns as Rows Pin
Wendelius20-Jan-09 8:17
mentorWendelius20-Jan-09 8:17 
GeneralRe: Convert Columns as Rows Pin
Wendelius20-Jan-09 8:15
mentorWendelius20-Jan-09 8:15 
QuestionMS Access Query: Bit value in a Where Clause Pin
swjam19-Jan-09 0:03
swjam19-Jan-09 0:03 
Questionvertical to Horzontal data display Pin
Learner52018-Jan-09 23:22
Learner52018-Jan-09 23:22 
i got 2 tables Reports_tbl and Manger_tbl
Reports_tbl
Manager DepID NumOfEmp_Reports
1 1 2
1 2 5
1 3 1
2 1 13
2 2 10
2 3 0
3 1 1
3 2 2
3 3 9

Manager_tbl
ManagerID ManagerName
1 Sam
2 Joseph
3 Paul



assuming that DeptID as Fin =1, Mng =2 and Sec =3 because i have to show Name of departments and NumOfEmp_Reports to sam,joeph,and paul

i have written query

select m.ManagerName, r.NumOfEmp_Reports as Fin ,r.NumOfEmp_Reports as Mng ,r.NumOfEmp_Reports as Sec
from Manager_tbl as m
Inner join Rerports_tbl as r
on m.managerId =r.mangaerId

the result of this query is as

ManagerName Fin Mng Sec
Sam 2 2 2
Sam 5 5 5
sam 1 1 1
Joseph 13 13 13
Joseph 10 10 10
Joseph 0 0 0
Paul 1 1 1
Paul 2 2 2
Paul 9 9 9


but i have to diplay result as following



ManagerName Fin Mng Sec
Sam 2 5 1
Joseph 13 10 0
Paul 1 2 9


thnx in adv for any kind help.
regards learner
AnswerRe: vertical to Horzontal data display Pin
Wendelius19-Jan-09 2:17
mentorWendelius19-Jan-09 2:17 
GeneralRe: vertical to Horzontal data display Pin
Learner52019-Jan-09 3:12
Learner52019-Jan-09 3:12 
GeneralRe: vertical to Horzontal data display Pin
Wendelius19-Jan-09 6:52
mentorWendelius19-Jan-09 6:52 
QuestionSave Query Result as XML File in SQL Server 2005 Pin
Abhijit Jana18-Jan-09 23:22
professionalAbhijit Jana18-Jan-09 23:22 
AnswerDone !!! Pin
Abhijit Jana19-Jan-09 2:04
professionalAbhijit Jana19-Jan-09 2:04 
GeneralRe: Done !!! Pin
Wendelius19-Jan-09 8:50
mentorWendelius19-Jan-09 8:50 
QuestionHow to get leaf nodes of a particular Parent using sql Query Pin
vidhyap18-Jan-09 23:10
vidhyap18-Jan-09 23:10 
AnswerRe: How to get leaf nodes of a particular Parent using sql Query Pin
kingindra18-Jan-09 23:16
kingindra18-Jan-09 23:16 
AnswerRe: How to get leaf nodes of a particular Parent using sql Query Pin
Wendelius19-Jan-09 2:09
mentorWendelius19-Jan-09 2:09 
QuestionInsert Stmt returns -1 Pin
AB777118-Jan-09 19:43
AB777118-Jan-09 19:43 
AnswerRe: Insert Stmt returns -1 Pin
Reza Raad18-Jan-09 20:30
Reza Raad18-Jan-09 20:30 
GeneralRe: Insert Stmt returns -1 Pin
AB777118-Jan-09 20:39
AB777118-Jan-09 20:39 
GeneralRe: Insert Stmt returns -1 Pin
Reza Raad18-Jan-09 21:21
Reza Raad18-Jan-09 21:21 
AnswerRe: Insert Stmt returns -1 Pin
Aman Bhullar18-Jan-09 20:45
Aman Bhullar18-Jan-09 20:45 
GeneralRe: Insert Stmt returns -1 Pin
AB777118-Jan-09 20:52
AB777118-Jan-09 20:52 
GeneralRe: Insert Stmt returns -1 Pin
N a v a n e e t h18-Jan-09 21:33
N a v a n e e t h18-Jan-09 21:33 
GeneralRe: Insert Stmt returns -1 Pin
AB777118-Jan-09 22:35
AB777118-Jan-09 22:35 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.