Click here to Skip to main content
15,910,980 members
Home / Discussions / Database
   

Database

 
Questionsyntax error in sql server Pin
jackson Fernandus16-Jan-08 19:01
jackson Fernandus16-Jan-08 19:01 
GeneralRe: syntax error in sql server Pin
Joe16-Jan-08 19:14
Joe16-Jan-08 19:14 
QuestionForeign Key information Pin
xbiplav16-Jan-08 18:26
xbiplav16-Jan-08 18:26 
GeneralRe: Foreign Key information Pin
Paul Conrad19-Jan-08 7:01
professionalPaul Conrad19-Jan-08 7:01 
GeneralTable metadata Pin
Le centriste16-Jan-08 8:02
Le centriste16-Jan-08 8:02 
GeneralRe: Table metadata Pin
pmarfleet16-Jan-08 8:45
pmarfleet16-Jan-08 8:45 
GeneralRe: Table metadata Pin
xbiplav16-Jan-08 18:21
xbiplav16-Jan-08 18:21 
QuestionHow to show rows as columns Pin
Member 412151116-Jan-08 6:12
Member 412151116-Jan-08 6:12 
I have 2 tables Earnings and Payroll with ID as primary key and used in payroll as EarnID.

Now how to show the data in tabulated form i.e. is there a way to show
data as shown below as a view?

USERID | BASIC | HRA | DA | TRAV | BONUS
1 | 5000 | 800 | 200 | 0 | 500
2 | 8000 | 1200| 200 |400| 0


TABLES

Earnings

ID | DESC
_______________
1 | BASIC
2 | HRA
3 | DA
4 | TRAV
5 | BONUS


Payroll

UserID | EarnID | Amount
______________________________
1 | 1 | 5000
1 | 2 | 800
1 | 3 | 200
1 | 4 | 0
1 | 5 | 500
2 | 1 | 8000
2 | 2 | 1200
2 | 3 | 200
2 | 4 | 400
2 | 5 | 0


Thank you,
Prashant Koli
GeneralRe: How to show rows as columns Pin
pmarfleet16-Jan-08 8:42
pmarfleet16-Jan-08 8:42 
GeneralRe: How to show rows as columns [modified] Pin
Paul Conrad19-Jan-08 7:03
professionalPaul Conrad19-Jan-08 7:03 
GeneralRe: How to show rows as columns Pin
pmarfleet19-Jan-08 9:08
pmarfleet19-Jan-08 9:08 
GeneralRe: How to show rows as columns Pin
Paul Conrad19-Jan-08 9:14
professionalPaul Conrad19-Jan-08 9:14 
Questionhow to get recordno?? Pin
biswa4716-Jan-08 2:04
biswa4716-Jan-08 2:04 
GeneralRe: how to get recordno?? [modified] Pin
Joe16-Jan-08 2:18
Joe16-Jan-08 2:18 
GeneralReplication SQL Pin
Elizma16-Jan-08 0:26
Elizma16-Jan-08 0:26 
GeneralRe: Replication SQL Pin
imsathy16-Jan-08 1:12
imsathy16-Jan-08 1:12 
GeneralRe: Replication SQL Pin
Elizma16-Jan-08 1:22
Elizma16-Jan-08 1:22 
GeneralRe: Replication SQL Pin
Tim Carmichael16-Jan-08 10:30
Tim Carmichael16-Jan-08 10:30 
GeneralRe: Replication SQL Pin
Elizma16-Jan-08 18:54
Elizma16-Jan-08 18:54 
GeneralDate convert function Pin
Kissy1615-Jan-08 23:57
Kissy1615-Jan-08 23:57 
GeneralRe: Date convert function Pin
Elizma16-Jan-08 0:37
Elizma16-Jan-08 0:37 
GeneralRe: Date convert function Pin
Kissy1616-Jan-08 0:47
Kissy1616-Jan-08 0:47 
QuestionUrgent:2nd highest salary without using a subquery in sql Pin
rockz...15-Jan-08 23:24
rockz...15-Jan-08 23:24 
GeneralRe: Urgent:2nd highest salary without using a subquery in sql Pin
Paul Conrad17-Jan-08 13:40
professionalPaul Conrad17-Jan-08 13:40 
GeneralRe: Urgent:2nd highest salary without using a subquery in sql Pin
Adeel Chaudhry17-Jan-08 22:34
Adeel Chaudhry17-Jan-08 22:34 

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.