/ Published in: SQL
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
SET @dtmToDate = DATEADD(DD, 1, @dtmToDate) SELECT TOP (@intMaximumRowsToReturnOnGrid) SysUserAuditID, LoginName, LoginDatetime, IPAddress, CASE IsAuthenticated WHEN 1 THEN 'Yes' ELSE 'No' END AS IsAuthenticated FROM AuditLogin WHERE (@strUserName = '' OR LoginName LIKE '%' + @strUserName + '%') AND LoginDateTime >= @dtmFromDate AND LoginDateTime <= @dtmToDate