Created
July 8, 2020 06:02
Revisions
-
hackimov created this gist
Jul 8, 2020 .There are no files selected for viewing
This file contains hidden or 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ SELECT CAST(document_data::json->>'EmpowermentId' AS char(24)) as internal_id, document_id from documents where doctype_id = '945dde7f-b55e-4666-990c-749751a3c726' and document_id <> CAST(document_data::json->>'EmpowermentId' AS char(24)) and CAST(document_data::json->>'EmpowermentId' AS char(24)) <> ' ' and CAST(document_data::json->>'EmpowermentId' AS char(24)) IS NOT NULL;