hi,
you can try below sql
SELECT ISNULL(dbo.Note.notCaseId,0) AS CaseID,
ISNULL(CONVERT(varchar(20),dbo.Note.notNoteDate,103),'') AS NoteDate,
ISNULL(dbo.Note.notDescription,'') AS NoteDescription,
ISNULL(dbo.GetRealUserName(dbo.aspnet_Users.UserName),'') AS NoteUserName
FROM dbo.Note
INNER JOIN dbo.aspnet_Users ON dbo.Note.notUserId = dbo.aspnet_Users.UserId
INNER JOIN [case] ON [case].casCaseId = dbo.Note.notCaseId
INNER join [CaseServiceTypeMapping] on [Case].casCaseID= csrvCaseId
inner join [CaseServiceType] on csrvServiceTypeId= cstyServiceTypeID AND IsGlobal=1
AND casCreateDate BETWEEN 'Apr 1 2012 12:00AM' AND 'Apr 3 2013 12:00AM'
ORDER BY dbo.Note.notNoteDate DESC
I can't run this sql without your db, so please run and inform me if you found any issue.
One more thing if you want a date hardcode then don't use this 'Apr 1 2012 12:00AM' format because if sql server default date format is differ than this format then its not work. Instead of this formate you can use yyyyMMdd.