tsql - Pivot a one row column T-SQL -


I have returned a row line from the query that looks something like

  [< Date> [Date 2] [Date 3] [Date 4] [Date 5] [Date 6]  

And I want all dates to be stacked in such a way

  [Date1] [Date 2] [Date 3] [Date 4] [Date 5] [Date 6]  

Various questions and statements of association How will I do without it? I tried to play with the PIVOT function but since there is nothing to collect the rows in it, I am confused.

Try to use UNPVIOT, such as:

  Select dates (choose from your SEB) as P UNPIVOT (Date for Sake Inn ([Date1], [Date 2], [Date 3], [Date 4], [Date 5], [Date 6]) Unpvt  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -