Skip to content

Instantly share code, notes, and snippets.

@smarenich
Created October 27, 2015 04:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save smarenich/cdbfb2aca1c493a0caf1 to your computer and use it in GitHub Desktop.
Save smarenich/cdbfb2aca1c493a0caf1 to your computer and use it in GitHub Desktop.
select
CompanyID,
BatchID,
ChangeID,
ScreenID,
(Select top 1 username from Users u where PKID = UserID),
ChangeDate,
Operation,
REPLACE(CAST(CAST(CombinedKey AS VARCHAR(max)) AS VARBINARY(max)), 0x0, ','),
REPLACE(CAST(CAST(ModifiedFields AS VARCHAR(max)) AS VARBINARY(max)), 0x0, ',')
from AuditHistory
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment