Parth Dave

Parth Dave

  • 1.4k
  • 336
  • 72.8k

Cross tab query/ Pivot. How should i do???

Mar 9 2014 10:18 AM
I got stuck at a place while making attendance application. VB.
GUYS CAN SUGGEST ME QUERY FOR FOLLOWING .
 NO STORE PROCEDURE PLEASE, 

I have a table in my sql database.
2 columns , name and dates.
 
NAMES | DATES
 
abc 1-1-2014
abc 2-1-2014
cde 2-1-2014 
cde 3-1-2014
efg 3-1-2014
hij 4-1-2014

 
i want a query so that i can show this information in GRID. 
 
NAMES 1-1-2014 || 2-1-2014 || 3-1-2014 || 4-1-2014 
 
abc yes yes no no
cde no yes yes no
efg no no yes yes
hij no no no yes
 

 
Can u guys suggest me a query for this. I'll do the by myself.
i am not much good at database. Thank u .

Answers (1)