I need to order by this SQl statement to get the Item count for <%# Eval("ICount") %>
The problem is i don't know how to "ORDER BY" this one
SQL:
SELECT DATEPART(DAY,BLG_DATE) as DDay,
datename(month,BLG_DATE) as DMonth,
DATEPART(YEAR,BLG_DATE) as DYear,COUNT(BLG_DATE) as ICount
FROM [BLG]
INNER JOIN [ACC]
ON [BLG].ACC_ID=[ACC].ACC_ID
WHERE [BLG].ACC_ID='1'and [BLG].BLG_DATE LIKE '%2013%' ORDER BY --????
ASP.NET:
<asp:Repeater ID="childRep" runat="server">
<ItemTemplate>
<li><a href="blog.aspx?month=<%# Eval("DMonth") %>"><em><%# Eval("DDay") %></em><%# Eval("DMonth") %><span><%# Eval("ICount") %></span></a></li>
</ItemTemplate>
</asp:Repeater>
I need the column DMonth,DDay,DYear, and ICount to fill the Repeater
Note: I only have table BLG(BLG_ID,ACC_ID,BLG_DATE) and ACC(ACC_ID,ACC_USER,ACC_PASS)