This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=begin | |
WARNING - I think this goes without saying for random gists you find on the internet, but you | |
probably shouldn't use this in production. | |
For every altcoin you want to store, create this schema: | |
CREATE SCHEMA altcoin; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Before running, you may need to perform a find/replace on "documentid" to the name of your document number field. | |
WITH dates AS ( | |
SELECT | |
documentid, | |
id, | |
attachpid, | |
CONVERT(nvarchar, [DateRcvd], 102) + ' ' + [TimeRcvd] as DateTimeRcvd, | |
CONVERT(nvarchar, [DateSent], 102) + ' ' + [TimeSent] as DateTimeSent, | |
CONVERT(nvarchar, [DateLastPrnt], 102) + ' ' + [TimeLastPrnt] as DateTimeLastPrnt, |
NewerOlder