Monday, May 4, 2009

how to get how many records entered in day by a user in sql server.

Hi Guys,

Last time i look at the one fourm there one one question how do know how many records entered in per day by a user.

i thought in my mind make a script to that.


SELECT COUNT(*) From Tablebname
where CreatedDate=GetDate() and UserName=@UserName;

Note:You need keep a column for DateOfCreation in you table.

Thank you
Keep It Watch.

No comments:

Post a Comment