Skip to content

Instantly share code, notes, and snippets.

@wvpv
Last active August 21, 2023 04:07
Show Gist options
  • Save wvpv/c5b2c5eb99e497d6ab5ae39a24bff082 to your computer and use it in GitHub Desktop.
Save wvpv/c5b2c5eb99e497d6ab5ae39a24bff082 to your computer and use it in GitHub Desktop.
Journey Emails
select
left(convert(varchar(36), jn.VersionID),36) VersionID
, left(jn.JourneyName,100) JourneyName
, left(ja.ActivityName,100) ActivityName
, left(ja.JourneyActivityObjectID,36) JourneyActivityObjectID
from _Journey jn
inner join (
select
convert(varchar(36), ja0.VersionID) VersionID /* UniqueIdentifier datatype doesnt play nicely with JO-INs */
, convert(varchar(36), ja0.ActivityID) ActivityID
, ja0.ActivityName
, ja0.ActivityExternalKey
, ja0.JourneyActivityObjectID
, ja0.ActivityType
from _JourneyActivity ja0
) ja on ja.versionid = jn.versionid
where convert(varchar(36),ja.JourneyActivityObjectID) != '00000000-0000-0000-0000-000000000000'
and isnull(ja.ActivityName,'') != ''
/* name: JourneyEmails */
/* target: JourneyEmails */
/* action: update */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment