Click here to Skip to main content
15,891,513 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi guys

I have a form with datagridview.
Datagridview takes the data from an access database with this sql query :

"SELECT MonID,Unitname,Personel,Mdate FROM tblMonth ORDER BY Unitname"

The result is in this image :
http://i62.tinypic.com/10p3806.jpg[^]

How can i fix the sql query to show like this image :
http://i62.tinypic.com/osa2s4.jpg[^]

Thanks in advance
Posted
Updated 6-Feb-15 6:29am
v2

1 solution

You can trying using the GROUP BY[^] to group the data by that Unitname.

Otherwise, you can query data seperately to check if there is any record present in the database to be shown in every day (but that will take a lot of queries).
 
Share this answer
 
Comments
jomachi 6-Feb-15 14:45pm    
Thank you my friend for responce I'll try it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900