Skip to content

Instantly share code, notes, and snippets.

@trnktms
Last active May 6, 2019 15:29
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 trnktms/781b3f6b591ac9856bd7f1d3b6f17b5b to your computer and use it in GitHub Desktop.
Save trnktms/781b3f6b591ac9856bd7f1d3b6f17b5b to your computer and use it in GitHub Desktop.
PRINT 'Different values on the same items - Shared Fields'
select tds.[ItemId],
tds.[FieldId],
tds.[Value] as 'TDS Value',
unicorn.[Value] as 'Unicorn Value'
from [tds910_Master].[dbo].[SharedFields] as tds
join [unicorn910_Master].[dbo].[SharedFields] unicorn
on tds.ItemId = unicorn.ItemId
and tds.FieldId = unicorn.FieldId
and tds.FieldId != 'D9CF14B1-FA16-4BA6-9288-E8A174D4D522' /* __Updated */
and tds.FieldId != '8CDC337E-A112-42FB-BBB4-4143751E123F' /* __Revision */
and tds.FieldId != '25BED78C-4957-4165-998A-CA1B52F67497' /* __Created */
and tds.FieldId != 'BADD9CF9-53E0-4D0C-BCC0-2D784C282F6A' /* __Updated by */
and tds.FieldId != '52807595-0F8F-4B20-8D2A-CB71D28C6103' /* __Owner */
and tds.FieldId != '5DD74568-4D4B-44C1-B513-0AF5F4CDA34F' /* __Created by */
and tds.FieldId != '001DD393-96C5-490B-924A-B0F25CD9EFD8' /* __Lock */
and tds.FieldId != '40E50ED9-BA07-4702-992E-A912738D32DC' /* Blob */
and tds.Value != unicorn.Value
PRINT 'Different values on the same items - Versioned Fields'
select tds.[ItemId],
tds.[FieldId],
tds.[Language],
tds.[Value] as 'TDS Value',
unicorn.[Value] as 'Unicorn Value'
from [tds910_Master].[dbo].[VersionedFields] as tds
join [unicorn910_Master].[dbo].[VersionedFields] unicorn
on tds.ItemId = unicorn.ItemId
and tds.Language = unicorn.Language
and tds.FieldId = unicorn.FieldId
and unicorn.Value != 'sitecore\unicorn'
and tds.FieldId != 'D9CF14B1-FA16-4BA6-9288-E8A174D4D522' /* __Updated */
and tds.FieldId != '8CDC337E-A112-42FB-BBB4-4143751E123F' /* __Revision */
and tds.FieldId != '25BED78C-4957-4165-998A-CA1B52F67497' /* __Created */
and tds.FieldId != 'BADD9CF9-53E0-4D0C-BCC0-2D784C282F6A' /* __Updated by */
and tds.FieldId != '52807595-0F8F-4B20-8D2A-CB71D28C6103' /* __Owner */
and tds.FieldId != '5DD74568-4D4B-44C1-B513-0AF5F4CDA34F' /* __Created by */
and tds.FieldId != '001DD393-96C5-490B-924A-B0F25CD9EFD8' /* __Lock */
and tds.FieldId != '40E50ED9-BA07-4702-992E-A912738D32DC' /* Blob */
and tds.Value != unicorn.Value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment