SHARE
TWEET

Untitled

a guest Aug 21st, 2019 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. cmd.CommandText = "SELECT CONVERT(date, [DateTime]) 'Date of Download', ActionBy AS 'User Full Name', COUNT(DISTINCT CAST(Identifier AS NVARCHAR(10)) + Remarks + Link) 'Number of Document Downloads' " +
  2.     " FROM [dbo].[AuditLog] "+
  3.     " WHERE ActionTaken = 'Clicked' "+
  4.     " and Type = 'Attachment Link'" +
  5.     " and CONVERT(date, [DateTime]) BETWEEN CONVERT(date,'" + scanStartDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "') and CONVERT(date,'" + scanEndDate.ToString("yyyy-MM-dd HH:mm:ss.fff") + "') "+
  6.     " GROUP BY CONVERT(date, [DateTime]), ActionBy "+
  7.     " HAVING COUNT(DISTINCT Identifier) > " + limit +
  8.     " ORDER BY COUNT(DISTINCT Identifier) DESC";
  9.      
  10. " and Type = 'Attachment Link' OR 'Attachment Link - Search'" +
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top