Quantcast
Channel: SQL Transpose Columns
Browsing all 5 articles
Browse latest View live

SQL Transpose Columns

create table #t (dt date, c1 int, c2 int) insert into #t values ('20190101',1,4) insert into #t values ('20190101',2,5) insert into #t values ('20190101',3,6)select       dt,col_value        from...

View Article



SQL Transpose Columns

UNION would be the best way.You could create your second table first then insert 120 times your data, changing the column in a loop. Do this with dynamic SQL.

View Article

SQL Transpose Columns

Hi Olaf,Thanks for your prompt reply. We cannot use union all in this case because we have more than 100 columns(Column1 to Column 120) and we cannot use union all 100 times.Is there any other way to...

View Article

SQL Transpose Columns

No need for UNPIVOT, a simple UNION ALL query will do the jobSELECT Date, Column1 FROM yourTable UNION ALL SELECT Date, Column2 FROM yourTableOlaf Helper [ Blog] [ Xing] [ MVP]

View Article

SQL Transpose Columns

Hello EveryOne,Can anyone provide me solution to my below requirement in sql ? I have below data in my table.DateColumn1`Column28/31/2019168/31/2019278/31/2019388/31/2019498/31/2019510I need below...

View Article

Browsing all 5 articles
Browse latest View live




Latest Images

Pangarap Quotes

Pangarap Quotes

Vimeo 10.7.0 by Vimeo.com, Inc.

Vimeo 10.7.0 by Vimeo.com, Inc.

HANGAD

HANGAD

MAKAKAALAM

MAKAKAALAM

Doodle Jump 3.11.30 by Lima Sky LLC

Doodle Jump 3.11.30 by Lima Sky LLC