12
Reply

how convert row as column using pivot in sql

siva nathan

siva nathan

Apr 10 2017 7:38 AM
448
 i have a table  record ike this i want to convert rows as columns using pivot
 attdate present
  04-01-17 x
  04-02-17 /
  04-03-17 L
  04-04-17 AB
i want to convert attdate as column and data is present
like this
here 1,2,3 as attdate ==>day 
 1 2 3 4 5
 x / L AB 
how to write a query for this 

Answers (12)