KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
UNPIVOT will not return NULL s, but I need them in a comparison query . I am trying to avoid using ISNULL the following example (Because in the real sql there are over 100 fields): Select ID, theValue, column_name From (select ID, ISNULL(CAST([TheColumnToCompare] AS VarChar(1000)), '') as TheColumnToCompare from MyView where The_Date = '04/30/2009' ) MA UNPIVOT (theValue FOR column_name IN ([TheColumnToCompare]) ) AS unpvt Any alternatives?
Tags (comma-separated)
Save Edits
Cancel