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.
| Author |
Topic |
|
sqlbee
Starting Member
11 Posts |
Posted - 2003-08-13 : 12:28:16
|
| can we use cross tab report got character fields too?SELECT Employee, CASE FIELD_NAME WHEN 'A-CDSP Full' THEN A_FIELD END AS Q1, CASE FIELD_NAME WHEN 'A-DayOfEvntPlanChg' THEN A_FIELD END AS Q2, CASE FIELD_NAME WHEN 'A-Roster Code' THEN A_FIELD END AS Q3, CASE FIELD_NAME WHEN 'A-Self Empl SS Part' THEN A_FIELD END AS Q4FROM #tempI need to take the employee and A_field and match field_name with A_fieldand now i get employee,field_name,field_name,Field_name.....and the value of field name should match with the corresponding A_FieldA_FIELD N_FIELD FIELD_NAME EMPLOYEE D_FIELD---------- ------------- -------------------- ----------------------------------------------------------------- N .00 A-CDSP Full 11753-01-01 00:00:00.000NA . 00 A-DayOfEvntPlanChg 11753-01-01 00:00:00.000LAYWORKER .00 A-Roster Code 11753-01-01 00:00:00.000NY .00 A-Self Empl SS Part 11753-01-01 00:00:00.000N .00 P-CRP$ to LCC 11753-01-01 00:00:00.000THIS IS A VIEW NOW I NEED TO GET THE RESULT ASEMPLOYEE A-CDSP Full A-DayOfEvntPlanChg A-Roster Code A-Self EmplSS Part P-CRP$ to LCC 1 N NA LAYWORKER NYN |
|
|
|
|
|